Google calendar API move event - api

Heres the deal,
On googles developer website they have at the bottom of each api function description a tool to try out the api, specifically I am using the calendar api (where it says " Use the APIs Explorer bellow to ...):
https://developers.google.com/google-apps/calendar/v3/reference/events/get
This call returns an event when you enter a calendar ID and an eventID. After switching the little OAuth2.0 switch on and entering my calandarID and an event ID of mine it returns a nice 200 ok response with the event details.
Heres the problem:
I go over to the move function in the calendar api:
https://developers.google.com/google-apps/calendar/v3/reference/events/move
And fill in once again my calendar ID containing the event I want to move, the event ID (same as before) and the destination calendar ID (my other gmail account). but on executing this I get a red box with "the resource was not found" and the response is a 404.
Weird thing is I have been able to do this via the actual google calendar website by going into edit event -> drop down: calendar -> change owner, I get a box to fill in new calendar ID and it successfully went to my other gmail. Both calendars where not public when I tried via the GUI and are not public now when using the API. Preferably I want them to stay that way.
Any ideas why the api for moving a calendar event is not working for me?

To move an event using events.move, you should have write access to both the calendars. I tried to move to different gmail account but it gave 404 error. But when I tried with moving to secondary calendar, it worked for me. developers.google.com/google-apps/calendar/concepts

I was getting a 404 error, and I assumed it was a credentials problem since that's what other people online wrote about.
Currently, when I browse the Google Calendar website for each of my calendars and visit Share This Calendar, I see the email address of my service account listed with credentials to "Make changes to events". That's on both the origin calendar and the destination calendar.
So I couldn't figure out how to set up my credentials differently.
It turned out not to be a problem with credentials at all.
I had been using the "eid" from the URL of the Google Calendar event webpage and assumed it was the Event ID. It's not.
When I use a valid Event ID, the "move" command worked as documented here.

Related

GA4 Purchase Event duplicate

We are running GA4 measurements with GTM embedded in our Shopify store.
It is generally working fine, but the purchase event is occasionally firing in duplicate.
I checked the search report and found several pages with 2 purchase events and 1 display count. (Not all, but only some of them.)
We created a test environment and ran the operation several times, but the same phenomenon did not occur.
I think that GTM is probably sending the purchase event twice, but I have no idea why this is happening.
I have written the js to send the event as window.dataLayer.push and send it only once on the page.
I would appreciate any information you can give me if you are having similar problems or if you have solved the problem.
Thank you in advance.
Having similar issue in Shopify Plus store. Not only purchase, but events view_item , add_to_cart are triggered twice. This view_item marked 34 on screenshot event is gtag event pushed to datalayer automatically , at the same time event view_item marked 36 is my datalayer push
Tried to investigate why is it pushed automatically and found this push in Console .Seems these duplicating events are connected with Google Shopping App conversion events because when I compared conversion labels of them in my Google Ads account , they were the same as in Tag Assistant extension and in Google Ads account (last picture contains begin_checkout event label, view_item conversion was deleted)
This app is called Feed for Google Shopping if you search in your Shopify admin or also its site is https://gsf.simprosysapps.com/.
Also tried to Deactivate in this Google shopping app Google ads conversion tracking tag but it does not help. Now I am trying to find a way how to turn off these conversion events and get rid of these pushes. Maybe if there will be possibility just to rename them, they will not double in GA4 property.

Add custom data to google calendar attachment using Calendly

I am embedding Calendly into my application via react-calendly npm module. However, I stumbled upon a problem. I want to add some custom fields to the calendar event attachment section. For example, standard Google Calendar event created via Calendly will have the following information:
Event Name: Some Service
Need to make changes to this event?
Cancel: https://calendly.com/cancellations/f3ce3f74-e7b6-44c4-9f40-fe11e0126321
Reschedule: https://calendly.com/reschedulings/f7ce2f74-e7b6-44c4-93b0-fe11e0126621
And I want to be able to attach some custom information to the attachment section like
Need to make changes to this event?
Cancel: https://calendly.com/cancellations/f3ce3f74-e7b6-44c4-9f40-fe11e0126321
Reschedule: https://calendly.com/reschedulings/f7ce2f74-e7b6-44c4-93b0-fe11e0126621
customerAddress: <address_here>,
customerAge: <age>
However, I want this information only in our company Calendar and not customer calendar.
Can't find any useful information about how this problem can be solved. Any help or direction is appreciated.

telegram bot, callback query of an inline button in a group chat, redirect the user to private chat of bot. python

My bot sends messages to groups with inline button, what I want, is when the button is clicked, chat with the bot page should open, i.e. somehow redirect the user to the private chat with the bot.
I'm using this wrapper.
What I have tried so far is to set a url in answer_callback method, equal to the url of my bot i.e. url="https://t.me/my_sample_bot
but I keep getting URL_INVALID response from telegram, I tried http(since I read somewhere in the api documentation that the urls should be HTTP), but that did not work either.
My question is am I doing it right? I mean do I have to set the url in answer_callback method to redirect the user, or I should try another way?
Well I figured it out myself, setting the url was the right way to do it, and though the Wrappers documentation is not detailed, I took a look at source code and there was a docstring for the method answer_callback_query that said this about the url:
:param url: (Optional) URL that will be opened by the user's client. If you have created a Game and accepted the conditions via #Botfather, specify the URL that opens your game – note that this will only work if the query comes from a callback_game button.
Otherwise, you may use links like telegram.me/your_bot?start=XXXX that open your bot with a parameter.
so all I had to do was to give it a link with of my bot, with a start query

How to remove sign-in restriction from Google Form programmatically?

I am creating Google Forms programmatically with a Google Script project.
DriveApp is used to grant view access to anyone with a link.
var form = FormApp.create("Test form");
var formFile = DriveApp.getFileById(form.getId());
formFile.setSharing(DriveApp.Access.ANYONE_WITH_LINK, DriveApp.Permission.VIEW);
However the Form still requires "anyone" to sign-in and it's restricted to my G Suite domain users. I've tried to find how to disable this but I don't know how the feature is even called in Google Scripts.
See the attached image with a checked box:
Note: I can disable the sign-in requirement manually. But Forms are delivered to respondents automatically and there's no time to do this manual step.
I haven't had to do this, so I'm not sure if it's what you need, but have you tried using the setRequireLogin(requireLogin) method when creating your forms?
See https://developers.google.com/apps-script/reference/forms/form#setRequireLogin(Boolean)

Custom variables in Google Analytics

I have an application in which I am displaying dynamic advertisements. There are some ads displayed on pages without logging in, and others on pages that you have to log in to access them.
First, I want to be able to track how many clicks have been made on a given ad accessible anonymously.
I added this code to the onclick event of the ad
onclick="ga('set', 'dimension1', '#item.Id')" // #item.Id is the Id of the Ad
I can see that the event is triggered in the GA Debugger in Chrome, but I cannot see the result in GA even after 24h.
Second, I want to be able to track the Ids of the users who have clicked on the a given ad. And I don't know if this can be done using GA.
An ideas ?
Custom Dimensions and Metrics are necessarily connected to an interaction and cannot be sent on their own - they must always be followed by an interaction hit (pageview, event, transaction etc).