Google Calendar API - how to add a calendar gadget along with event? - google-calendar-api

I'm trying to add a google calendar gadget along with an event. However, whenever I try and add a gadget along with an event, the google calendar API gives me an 'invalid value' error.
I'm using the event.insert protocol. If I send the request in without the gadget block, it works fine and adds an event. However, adding the gadget block throws an error.
{
"location": "San Jose, CA",
"description": "blah blah blah blah",
"kind": "calendar#event",
"start": {
"dateTime": "2012-04-04T10:00:00.000-07:00"
},
"end": {
"dateTime": "2012-04-04T10:00:00.000-07:00"
},
"gadget": {
"iconLink": "http://www.thefreedictionary.com/favicon.ico",
"link": "http://www.thefreedictionary.com/_/WoD/wod-module.xml",
"title": "Word of the Day",
"type": "application/x-google-gadgets+xml",
"height": 136,
"width": 300,
"display": "icon"
}
}
Does anyone know why this is occurring? I really need to find a way to insert images into the events I add to a google calendar. Thanks!

I too was faced with this problem. It seems to me that the the iconLink and link must be https for this to work.

Related

Thumbnails not showing up after creating a post via linkedin API call

Thumbnails from external urls are not loading. However, the post inspector tool loads it just fine.
Page I used to perform some tests: https://www.cnbc.com/2022/10/28/more-than-40percent-of-us-households-will-owe-no-federal-income-tax-for-2022.html
Things I've tried so far:
Add an extra parameter at the end of the url in order to clear linkedin cache.
Post Inspector Tool
I did some research but I wasn't successful on finding a solution.
I created a post using different links like youtube and stackoverflow. Thumbnails didn't show up either.
I made sure each page has those required meta(open graph) tags that allows the crawler to retrieve information.
Here's an example of one of those API requests I've been calling to(I got this from the docs):
`
{
"author": "urn:li:person:{ID}",
"lifecycleState": "PUBLISHED",
"specificContent": {
"com.linkedin.ugc.ShareContent": {
"shareCommentary": {
"text": "Learning more about LinkedIn by reading the LinkedIn Blog!"
},
"shareMediaCategory": "ARTICLE",
"media": [
{
"status": "READY",
"description": {
"text": "Official LinkedIn Blog - Your source for insights and information about LinkedIn."
},
"originalUrl": "https://www.cnbc.com/2022/10/28/more-than-40percent-of-us-households-will-owe-no-federal-income-tax-for-2022.html",
"title": {
"text": "Official LinkedIn Blog"
}
}
]
}
},
"visibility": {
"com.linkedin.ugc.MemberNetworkVisibility": "PUBLIC"
}
}
`
In the Share Media object, you're missing the media attribute. It accepts LinkedIn URN so you'll need to upload the image. Personally, I'm not using that attribute but thumbnails that accepts image url. I don't see it in the docs anymore so something might have been changed. At least it's still working for me and I haven't seen it deprecated in the changelog yet. Be careful with the image requirements as well. It accepts an image url with this signature
{
...,
"thumbnails": [{
"url": "https://image-url.com"
}]
}

I need to capture jsonapi response before node is created by JSONAPI through custom code

In Drupal 8/9. Need to capture data including 'attributes', 'type' and custom created group 'translate' when other party using jsonapi POST menthod to create articles in my site. This should be captured in custom module.
For Example here is the payload:
{
"data": {
"type": "node--cars",
"attributes": {
"title": "Test article flow 1"
"body": "This is custom body"
},
"relationships": {
},
"translate": {
"custom_field1": "Text 1",
"custom_field2": "Text 2"
}
}
}
API point fo this is "/jsonapi/node/cars". So actually before the 'cars' node is created need to capture "custom_field1" and "custom_field2" in "translate" so that need to write custom validation from custom module. Tried creating normalizer "TypedDataNormalizer" and "ContentEntityNormalizer" and in "normalize" class getting data. But its empty and its not calling this normalizer. Can someone please help me in this case how to achieve this. Thanks in advance

How to Enable Google Analytics Enhanced eCommerce using GTM

I had already tried to implement the configuration needed by following this video :
https://www.youtube.com/watch?v=IjyX6g2sZpk&ab_channel=TheSearchAgency
here is my datalayer :
<script>
var dataLayer = window.dataLayer || [];
dataLayer.push({
"event": "transaction",
"ecommerce": {
"purchase": {
"actionField": {
"id": "14c26747-503e-498c-a9b4-604fe1a479d1",
"affiliation": "Online Store",
"revenue": 41,
"tax": 5,
"shipping": 5
},
"products": [{
"id": "7w9e0",
"name": "Masons T-Shirt",
"price": "31.00",
"brand": "Masons",
"category": "T-Shirts",
"variant": "red",
"dimension1": "M",
"position": 0,
"quantity": 1
}]
}
}
});
</script>
Until now i was able to receive the same datalayer in my google tag manager :
Datalayer received in GTM Preview
and here is the config of my tag :
GTM CONFIG
My problem is that i can't see any data in the google analytics ecommerce overview, even if i waited more than 48 hours.
Check the network requests, see if you're sending your EEC data to the ?collect endpoint.
Check your debugging preview, see if the EEC event has fired exactly on the event you expect it to (transaction)
Check your property/measurement id. Make sure it's the same in GA and in GTM. And in the Network tab.
Confirm that you're using GA UA events everywhere.

Gtag Command ignored. Plugin "ec" has already been required on tracker

I writing the code to track Enhanced E-commerce with the gtag library. The impression of products hit sent when the page load and on clicking the Add to Cart button I sent add_to_cart event. But it gives me this error
analytics_debug.js:23 Command ignored. Plugin "ec" has already been required on tracker.
Here is my code
gtag("event", "add_to_cart", {
"items": [
{
"id": "2",
"name": "Hoodie",
"category": "cloth",
"quantity": "2",
"price": "16"
}
]
});

Watson Conversation and Google Map Static

I'm currently giving google map static a long/lat for the location.
Is it possible to display the image of google map static on the conversation?
Thanks
You won't be able to display it in the "Try it out" UI, but if you deploy your own application you can.
In your input node you can put the following line of text:
<img src="https://maps.googleapis.com/maps/api/staticmap?center=$long,$lat&zoom=11&size=200x200&sensor=false">
Then create a context variable long and lat. For example (placed in Welcome node).
{
"context": {
"lat": 55.27088,
"long": 25.2048
},
"output": {
"text": {
"values": [
"Hello. How can I help you?"
],
"selection_policy": "sequential"
}
}
}
Your previous line will be translated to this:
<img src="https://maps.googleapis.com/maps/api/staticmap?center=25.2048,55.27088&zoom=11&size=200x200&sensor=false">
Which will render:
The solution above will allow you to render in the conversation simple application.
Another option is to pass the lat/long as context variables to your application, and let it render. It will give you more control of how the map is rendered.
The following link will show what options you have for google maps.
https://developers.google.com/maps/web/

Resources