How to add a URL or Zoom Meeting ID to Google Calendar via API - google-calendar-api

I am writing a complex integration between Zoom and Google calendar - I can't really use their out of the box solutions. I have the Google Calendar API working fine (CRUD) but I don't see a way to add a Zoom meeting ID or a top level link via the API. It appears the Google Calendar product provides a place for Zoom meeting information - I just cannot see how to create it.

Looks like using event.description is the only way to do this - inline links. The other top level methods pertain to google products, like hangouts, only.

It's an old question, but for everyone looking for something similar you can do it using the conferenceData param.
The minimal working example is something like this:
conferenceData: {
conferenceSolution: {
key: { type: "addOn" },
name: "Zoom",
},
entryPoints: [
{
entryPointType: "video",
passcode: "4gnZXJ",
uri: "https://zoom.us/j/93831668388?pwd=UHRqU0VwMjF3d1B0VXU5bFBRYWIxdz09",
},
],
}
Keep in mind that you need to send the conferenceDataVersion query param with the value of 1 in order to take the conferenceData Docs

Related

LinkedIn Share API not showing image for URL some of the time

Our application lets an admin create a suggested social post for all of the members of his or her organization. The admin will insert a URL in our system and our platform creates a unique URL for each member. This is a link with a 302 redirect to the original link. It works similar to Bit.ly. When the member gets the suggested post he/she can create his/her own content for the post and url and approve for posting via the LinkedIn API. That all works perfectly.
As an example the share url could be https://example.com
Member one gets: https://yip.sh/1234
Member two gets: https://yip.sh/4321
Member three gets: https://yip.sh/4444
The PROBLEM: Some (a minority) of the member's posts do not share the meta image for the url. The majority of the social posts work and show a meta image so that tells me both the 302 redirect and the destination url are working correctly. I also have tried the urls from the post that do not work in the LinkedIn post inspector and the meta image shows up there.
My ASSUMPTION: Sometimes pulling the meta image takes a little longer than LinkedIn wants to wait and since each URL is unique it needs to check each time.
Possible SOLUTION: Automated ping of Linkedin post inspector to cache image before the share. This was what we did with Facebook when we had a similar problem. I have not found a way to do that though with LinkedIn.
Just to show the code we are using to share the post. But as I mentioned above this is working a majority of the time.
pass_the_hash = {
"author": "urn:li:person:#{#social_identity.uid}",
"lifecycleState": "PUBLISHED",
"specificContent": {
"com.linkedin.ugc.ShareContent": {
"shareCommentary": {
"text": "My Comment"
},
"shareMediaCategory": "ARTICLE",
"status" => "READY",
"originalUrl" => "https://yip.sh/1234"
}
},
"visibility": {
"com.linkedin.ugc.MemberNetworkVisibility": "PUBLIC"
}
}
Has anyone seen a similar issue with LinkedIn Share API not showing meta image consistently? Or possibly know of a way to automate usage of the post inspector?
To quote LinkedIn...
After updating your website with perfect preview content and image, if you try sharing your website link you will still see old preview content and image. That's because LinkedIn caches link preview content for 7 days. Source: Official LinkedIn Documentation.
As you and they state, you can use the LinkedIn Post Inspector to refresh the cache. If you wanted to go the approach of pinging/curling LinkedIn, you can do...
https://www.linkedin.com/sharing/share-offsite/?url={yourlURL}
For instance, seems to work for getting info from the LinkedIn share API for GitHub.
Of course, you do also have the less-desirable option of waiting 7 days, although it is nice to know that it eventually works itself out by itself.
In the ugcPosts endpoint of LinkedIn shares API, there are some changes that are causing these issues. You will need to make changes to your code and add extra key for thumbnails like below:
{
"author": "'.$ownerURN.$page_id.'",
"lifecycleState": "PUBLISHED",
"specificContent": {
"com.linkedin.ugc.ShareContent": {
"shareCommentary": {
"text": "'.$text.'"
},
"shareMediaCategory": "ARTICLE",
"media": [
{
"status": "READY",
"description": {
"text": "'.$linkDescription.'"
},
"originalUrl": "'.$href.'",
"title": {
"text": "'.$linkTitle.'"
},
"thumbnails": [{
"url": "'.$imageHref.'"
}]
}
]
}
},
"visibility": {
"com.linkedin.ugc.MemberNetworkVisibility": "PUBLIC"
}
}
I hope this is useful to people who are facing issues with the linkedIn Shares API now. I know this question is old but we faced this issue for a few days and the API documentation is not pointing out the issues.

Adding date filter In dashboard Metabase

I have Native query from My Google Analytics like this:
{
"ids": "ga:MY_GA_IDs",
"start-date": "2019-05-01",
"end-date": "2019-05-31",
"metrics": "ga:users,ga:newUsers,ga:sessions,ga:bounceRate,ga:pageviewsPerSession,ga:avgSessionDuration,ga:transactionsPerSession,ga:transactions,ga:transactionRevenue",
"dimensions": "ga:city",
"sort": "ga:city",
"filters": "ga:country=~(?i)indonesia",
"include-empty-rows": false,
"max-results": 10000
}
I try adding date filter for my dashboard using tag {{date_variable}} But it's not working. How can I adding dynamic date filter to my Dashboard?
For Metabase, on the dashboard page top right if you choose "Edit dashboard" like this -->:
Then choose "add filter" and link the filter to your {{example}} area in each table, it should work.
You will probably be better off the query builder when working with Analytics in metabase. The integration is not fully functional (check this and this issues for instance).
Check this post on metabase forum as a guidance (some other user had a very similar problem):
https://discourse.metabase.com/t/variables-in-google-analytics-native-query/4436

How do I add custom dimensions to Google Analytics with React Router?

My current analytics setup looks like this:
this.context.router.listen(location => {
analytics.page(location.pathname, {
title: document.title,
url: `${config.HOST_URL}${this.context.router.createHref(location)}`,
path: this.context.router.createHref(location),
referrer: document.referrer,
state: location.state,
});
});
The amount of data in the location object is pretty minimal. The question is, how do I get information about an item that is loaded in a componentDidMount block into the page tracking?
In this particular instance, I am trying to add information about an artwork that a user is looking at into Google analytics as a custom dimension. The link below shows how it would normally be added.
https://support.google.com/analytics/answer/2709828?hl=en#example-hit
I'm using react-router v2
From the information given, I'd say your best bet is on the pages you want to add more data put a condition in the listener to NOT log if loading that page. Then in the componentDidMount where you have the data call the analytics for the page.
Basically just override it for those pages that need more data.

Schema.org clarification for JSON-LD representation and URIs

I'm trying to encode in JSON-LD the semantic information related to a website using Schema.org.
The web site is very basic: it contains the home page, a gallery page with a list of images and the image detail page.
Reading the different examples from the Schema.org website, and having a look also at the "get started" section, it is not so easy to understand which information have to be provided in each page.
To clarify the question, I can provide a snippet of code that I'm trying to create, by deducing the needed information after reading the Schema.org documentation.
Below the list of specific questions:
Does the information provided in the home page need to be repeated in all of the other pages? In this case, how the additional information shall be encoded (how to state that the page is a ImageGallery or ImageObject)?
How to match (in the image detail page) the image with a URI to semantically link the thing in the image to a real world thing (using for example a dbpedia.org/resource/URI)?
Example
HOME PAGE
{ "#context":"http://schema.org",
"#type":"WebSite",
"name":"Site name abc",
"alternateName":"ABC",
"description":"description",
"keywords":"keywords",
"inLanguage":"en",
"url":"http://www.thewebsiteurl.com",
"potentialAction":{
"#type":"SearchAction",
"target":"http://www.thewebsiteurl.com/find/{search_term_string}",
"query-input":"required name=search_term_string"
}
}
GALLERY PAGE
{ "#context":"http://schema.org",
"#type":"ImageGallery",
"description":"description",
"keywords":"keywords",
"associatedMedia":[
{
"#type":"ImageObject",
"contentUrl": "http://...../image1URL.jpg",
},
{
"#type":"ImageObject",
"contentUrl": "http://...../image2URL.jpg",
},
.....
]
}
IMAGE DETAIL PAGE
{
"#context": "http://schema.org",
"#type": "ImageObject",
"author":{
"#type": "Person",
"name":"abc"
},
"contentLocation":{
"#type": "Place",
"geo": {
"#type": "GeoCoordinates",
"latitude": "[latitude]",
"longitude": "[longitude]"
},
"name": "Place name"
},
"copyrightHolder":{
"#type": "Organization",
"email": "info#example.mail",
"url" : "http://www.thewebsiteurl.com"
},
"contentUrl": "http://...../image1URL.jpg",
"datePublished": "[date]",
"description": "description",
"keywords":"keywords",
"name": "Image name",
"exifData":[
{
"#type": "PropertyValue",
"name": "Exposure Time",
"value": "1/10 sec."
},
.....
]
}
Does the information provided in the home page need to be repeated in all of the other pages?
With the syntaxes Microdata and RDFa, you would typically mark up what is available on a page. While the syntax JSON-LD is different from them (because it’s not marking up, i.e., it’s decoupled from the existing markup), there is no reason to handle it differently.
If you have content about a certain image on the homepage, the gallery page, and the detail page, you may (and, in my opinion, should) provide structured data about it on each of these pages.
One reason for this is that consumers don’t necessarily parse your whole site:
A consumer might find a single page, look for structured data, and is gone again without looking for another page of your website.
A consumer might find a single page, look for structured data, is interested in more data and follows links specified in your structured data (e.g., URIs given as property values).
So ideally provide structured data (or reference structured data which is provided elsewhere on your site) wherever it’s relevant.
In this case, how the additional information shall be encoded (how to state that the page is a ImageGallery or ImageObject)?
It can make sense to differentiate between the type for the document (in the case of web page, WebPage or one of its subtypes) and the type(s) for the thing(s) described in this document.
So ImageGallery (which is a subtype of WebPage) represents the page, and ImageObject represents an image that could be part of this page.
If possible (but it often isn’t), you should provide properties that put all provided nodes in relation. For example with hasPart/isPartOf, mainEntity/mainEntityOfPage, or of course properties like author etc.
How to match (in the image detail page) the image with a URI to semantically link the thing in the image to a real world thing (using for example a dbpedia.org/resource/URI)?
Schema.org’s sameAs property could be used for this purpose. But you could of course also use properties from other vocabularies, like owl:sameAs.

GTM/UA Track multiple authors

Seems like this would be quite simple but i cannot find much documentation available. Currently on our article system, each author name appears like this on each page:
<div id="author-info">
Mr. Man
According to Google, using custom dimensions is the way to do track authors in UA. Setup a custom dimension "Author" and set the scope to Hit/Session/User. Not sure i fully understand the different scope options. I get the following code:
var dimensionValue = 'SOME_DIMENSION_VALUE';
ga('set', 'dimension1', dimensionValue);
Which i'm assuming should be:
var author-id = 'Mr. Man';
ga('set', 'dimension1', author-id);
Is that correct?
Also, how can i pass the author information into the dataLayer and then call the author page views through GTM? How about multiple authors?
Ok, this answer comes from the G+ analytics community (link below). Credit goes to https://plus.google.com/u/0/+SimoAhava
Using GTM, we can do the whole thing using macros and set fields:
Create a Custom JavaScript Macro which returns the author name:
function() {
try{
return document.getElementById("author-info").children[0].text;
} catch(e) {
return "";
}
}
In your Pageview tag, go to More Settings -> Custom Dimensions, add custom dimension, put the index number of the CD you created in the required field and add the JavaScript macro to the Dimension field.
This setup grabs the text content of the page's author link and sends it as a custom dimension with the pageview. Since it's hit-scope, every pageview will be attached with the author info of the page.
https://plus.google.com/104258622890980927916/posts/e6cC6y8q1m6

Resources