I'm doing a tutorial for Google calendar so i can put it on my project..but it requires a Google calendarID so i can get events in my calendar my question is how or where do i get the calendarID and eventID?I'm doing the tutorial here
GET https://www.googleapis.com/calendar/v3/calendars/calendarId/events/eventId
this is where i should put the calendar id and event id
Calendar ID is the email address of a calendar. If you want to access your primary calendar, you should use your email address. Otherwise you can find it in the web UI in the calendar settings page.
Another option is to perform a CalendarList.list() operation and check the emails there.
Similarly for events you can do a list operation on the Events collection and learn the IDs.
Related
Essentially I've noticed that when a user's primary email is updated on their google account, their calendar ID will also change (e.g. ID will change from john#company.com to john_new#company.com).
This is a problem because I work on an application that relies on the calendar ID being a stable identifier for users. For example, lets say user A at a company schedules an event to their calendar through my application. We'll save metadata related to that event in our own database along with user A's calendar ID to denote that the event was scheduled to that calendar. This is important because we use this information to ensure that only users with write access to this calendar ID can edit this event from our application (important for security purposes).
Lets say user A gets their primary email updated, which causes their calendar ID to also change. Now, when I query the CalendarList endpoint to get a list of user A's calendars, I get back the new calendar ID, which makes my application think that user A should not have access to edit the event they just scheduled since that event was scheduled to a calendar ID that user A no longer has access to.
Is there a way around a problem like this? I can't find an endpoint that will return user A's "archived" calendar ID in addition to their new one. More deeply, I don't understand why their calendar ID changes as it feels like IDs should be stable identifiers...
In this case, by testing and working with the calendar API and Google Workspace it's a fact that the Calendar ID will always be the email address of the user account it’s associated with. I wish there was actual documentation but this is only from testing that I have verified this. There are other threads that explain the same, in this case with your situation you should modify your app in a way that the CalendarID is not based in a stable ID, as this depends on your email address.
I am creating a meeting series from an outlook client, on an office365 mailbox.
The invited user is on g-suite (email, calendar...).
My code connects to google calendar via the API and periodically checks of event changes \ new events \ cancelled etc.
I store the event ids in my database and use them to match to the event IDs I read from google calendar.
When a whole meeting series is changed - for instance a weekly series gets a new starting time - the event IDs returning from google calendar APIs - change!
I am not sure if the IDs are generated by office\outlook or by g-suite.
I am not sure what's the right way to match the events I stored with their old IDs, to the new events coming in.
If you read the Google API Documentation, it states that recurring events are composed of instances. The recurring event is a parent and individual instances are its children. Each child has a recurringEventId which identifies its parent. Their individual instance ids might change when they are changed.
See the following: https://developers.google.com/calendar/recurringevents#modifying_or_deleting_instances
I'm using the following tutorial, http://www.lunametrics.com/blog/2014/03/04/tracking-offline-transactions-universal-analytics/ which tells us how to add a transaction manually using a url like the following:
http://www.google-analytics.com/collect?v=1&tid=UA-123456789-1&cid=75839030.509493873&t=transaction&ti=52ea5aab1f0c2&tr=1100&cd1=52ea5a8bc6a4a
This works ok. However, the eCommerce part of GA does not register a conversion, so it's not possible to use the multi channel funnels report.
I'm wondering is there a way to register a sale similar to how a shopping cart would on a webpage? Would I have to add in the "clientId" for the customer, into the cart so the sale can be recorded against all the other actions in GA?
OR am I doing something wrong? Such as not registering an item? Would this trigger the ecommerce conversion to register?
Either way, somehow the ecommerce tag is not firing, so I can't record multi channel funnels based on clientId
You need save clientId in custom dimensions and in your site (it can be hide field, for example)
If you send transaction with use real clientid (send cid and cd# parameters) = this transaction will be linked with this user and all actions with this cid
On my practice better send t=event&ec=ecommerce&ea=purchase&pa=purchse&item...
With this method I have all data in ecommerce reports
Events created in outlook calendar with google calendar participants
and trying to fetch events from outlook and google calendar separately, but these are getting different id's and icalUID
Is there a way to find these two calendars having same events?
The mapping between iCalUID and EventId is not 1:1 (see https://developers.google.com/google-apps/calendar/v3/reference/events#iCalUID ).
You can search by iCalUID through calendar API's events.list() with parameter iCalUID: https://developers.google.com/google-apps/calendar/v3/reference/events/list#iCalUID
Most of my website traffic come from adwords, and fill a form to get called.
When A user fill a form, I have a customer created on my database.
For my business strategy, I want to know how much I payed for that lead, and how much benefit I make with it after the call.
For that I think I have to link analytics visitors and my customers directly.
I am searching for a way to put an analytics visitor ID on the request form or something like this...
You would need to get the visitor id and pass it into either a custom variable (ga.js) or custom dimension (analytics.js).
To get the visitor id for Google Analytics (ga.js) *I got this code from How to obtain Google Analytics visitor unique id? SO Answer:
_gaq.push(function(){
var tracker = _gat._getTrackers()[0];
var visit_code = tracker._visitCode();
console.log(visit_code);
});
To get the visitor id for Universal Analytics (analytics.js) *More documentation on this in Google's documentation:
ga(function(tracker) {
var clientId = tracker.get('clientId');
});
I've used this before, too:
ga.getAll()[0].get('clientId');
The best strategy in your case is:
Get user ID from GA or UA(as desribed advisor above)
Send user ID to database
Set up user ID as custom variable(in Googl Analytics) or custom dimension(in Universal Analytics)
Set up custom reports, where you can segment your visitors by their ID's