I have implemented a solution in our application to send certain events to Facebook Pixel via Conversions API. We are not using the Pixel JS code in our application. All events are sent from the server. We get the Pixel Id and Access Token from the customer and fbclid from the url. We use this data to send events using the Facebook Business SDK.
The events are being sent successfully and the events show up in the Events Manager.
However, the events are not assigned to the Campaigns which use the same Pixel. Has anyone faced this issue before? Please help if someone know the cause for this.
Sample data that we send via the SDK to Facebook.
{
"data": [
{
"event_name": "Lead",
"event_time": 1662450937,
"action_source": "chat",
"event_source_url": "https://test.test",
"user_data": {
"fbc": "fb.1.1662386239929.IwAR3NTvPLLPmv9FrKx9tmW1VL_NGjC9CmxxjZJQH5OPke0C2BH2AsldF1M"
}
}
]
}
Related
We using Google Analytics 4 and Facebook Pixel to keep records of visitors purchases, but I can't find any information about how to wait for those events results and only then redirect visitor (how to determine is those metrics are sent).
There should be a way to await all of them. For example, when checkout is complete, we track the purchase event but we don't want to leave the page until it's fully tracked to ensure the web request isn't terminated.
It's how the events called:
gtag("event", "purchase", { ... });
fbq("track", "Purchase", { ... });
gtag uses beacons to send events which should be guaranteed to be sent on most browsers.
I'm using calendar API to pull events of users in an organization that had installed my GSuite app as a service account (it just means that I have access to all the users in the organization).
I noticed some weird behavior - let's say I have an event with 2 participants - a and b (both are users in the company). when I use the calendar API events.list to pull event for a I get this event, and b is listed in the attendee list with responseStatus of 'accepted'.
When I pull the events for the same period of time for user b, I do not get this meeting, nor when I try to pull a specific event using the meeting id (event.get API). I also used showDeleted=True but still didn't get the event back when pulling the events of b (I'm pretty sure if the event would have been deleted then the responseStatus would have been 'decline').
What could be the reason for this behavior? I tried to reproduce it using two emails that I have access to, and I was not successful.
Since those are emails of my client I cannot just come up to them and ask what happened with this meeting.
This is the request I'm making (using python google API client):
from googleapiclient.discovery import build as Build
service = Build("calendar", "v3", credentials=credentials, cache_discovery=False)
service.events().list(calendarId='primary', timeMin=min_time, timeMax=max_time, pageToken=page_token, singleEvents=True).execute()
First I'm building the service using the service account credentials (delegating permissions to the current email), and then making the request to pull the events.
The min_time,max_time are strings like this - 2020-10-19T08:00:00+0000.
The pageToken starts as None but will change if there is a nextPageToken in the response.
This is the request I made to try and get the meeting of the user that appear as an attendee when pulling the event using another user's email & credentials:
service.events().get(calendarId='primary', eventId=<meeting_id>).execute()
But I'm getting 404 event not found response (This API returns deleted events - I've seen it)
I'm pulling all of the events correctly, and only saw this case on small number of the events (less than 5% of the meetings).
Any idea what could cause this?
Thanks!
I'm looking into building an external app that does things when a google calendar event starts or ends. Services like IFTT / Zapier seem to have this down pat, but I'm struggling to see where in the Google Calendar API docs they support webhooks/notifications when an event starts/ends, without actively constantly querying/storing upcoming events?
I already reviewed the Google Calendar API, but I'm not seeing a webhook/notification section that states how I could be notified when Google Calendar events start?
https://developers.google.com/calendar/overview
If you check the documentation it shows how to watch an event
Making watch requests
Each watchable Google Calendar API resource has an associated watch method at a URI of the following form:
https://www.googleapis.com/apiName/apiVersion/resourcePath/watch
To set up a notification channel for messages about changes to a particular resource, send a POST request to the watch method for the resource.
Each notification channel is associated both with a particular user and a particular resource (or set of resources). A watch request will not be successful unless the current user owns or has permission to access this resource.
Example
Start watching for changes to a collection of events on a given calendar:
POST https://www.googleapis.com/calendar/v3/calendars/my_calendar#gmail.com/events/watch
Authorization: Bearer auth_token_for_current_user
Content-Type: application/json
{
"id": "01234567-89ab-cdef-0123456789ab", // Your channel ID.
"type": "web_hook",
"address": "https://mydomaina.com/notifications", // Your receiving URL.
...
"token": "target=myApp-myCalendarChannelDest", // (Optional) Your channel token.
"expiration": 1426325213000 // (Optional) Your requested channel expiration time.
}
Is there some way with the Google Calendar API to view which rooms have been booked when retrieving a meeting via the API?
Also is there a way to add a room resource to a meeting via the Calendar API?
The fact that you are using resources with Google calendar tells me that you are a Google Apps for Business/Education user.
If you want a list of resources at your organisation you need to use the Google Apps Calendar Resource API. You can also use this API to create new resources.
If you want to list availability of a calendar resource you need to use the Google Calendar API. You need to query the API using a username that has the appropriate permissions to view the resource calendar. The id of a calendar resource looks like an email address ending in #resource.calendar.google.com
You will also notice that resources are listed amongst your event attendees.
Now the bad news
At the time of writing (October 2013) the Google Apps Calendar Resource API uses Atom/OAuth 1.0a whereas the Google Calendar API version 3 uses JSON/OAuth 2.0.
So that means you currently need to implement two different mechanisms of authentication and two different styles of API, fun eh?
That said since Google are deprecating support for OAuth 1.0a, I'm sure they are beavering away re-writing the Google Apps Calendar Resource API to become JSON/OAuth 2.0 compatible (I may post a question here to ask about that!).
Update
Please see my question for information regarding the lifespan of the Google Apps Calendar Resource API:
Google Apps Calendar Resource API v1 (Atom/OAuth 1.0) likely lifespan?
I've just tried it out - it works fine (returns array of booked dates for each resource id, eventually if such array is empty - resource is available for you. I'd like to get boolean values, but still..)
So, you need to use following API.
Go to section try it
login using oauth
paste request below (Replace resource ids to existing)
Request code:
{
"maxResults": 10,
"timeMin": "2013-11-27T00:00:00+02:00",
"timeMax": "2013-12-27T23:59:59+02:00",
"items": [
{
"id": "RESOURCE_ID_1#resource.calendar.google.com"
},
{
"id": "RESOURCE_ID_2#resource.calendar.google.com"
},
{
"id": "RESOURCE_ID_3#resource.calendar.google.com"
}
]
}
Have you tried querying the free/busy information of the resource (https://developers.google.com/google-apps/calendar/v3/reference/freebusy/query)?
You can update a room resource to a meeting by updating the event
(https://developers.google.com/google-apps/calendar/v3/reference/events/update).
Hopefully, this gives you some good ideas.
I've got a relatively simple task I'm trying to accomplish with the Google Calendar v3 API, but I keep running into 404 errors. I only need to access one calendar (belonging to my client) and get read-only event data via Javascript (just using the protocol with an Ajax call), so I'm trying to avoid using authentication.
I made the calendar public by going to the calendar sharing settings clicking "Share this calendar with others" and then choosing "Make this calendar public. However, the only option I have for public is "See only free/busy (hide details)."
Having realized that, I edited each event to specifically set the type to "public."
Now, I'm able to get a eventList from the calendar resource, but there are only a few details for each item in the array (see below). And, when I try to access the individual event, I get a 404.
Having tried with a basic test calendar, I'm fairly certain the calendar sharing settings are the issue. The main difference between my client's calendar and the test calendar I used is that his calendar is a part of a Google Apps for business account, I'm fairly certain.
Is there any setting in the calendar itself I can edit to make the API work without having to use auth to access the data? Or, is there an option in the business apps settings I can have my client change? Again, I'm talking about only doing GET requests on one specific calendar using Javascript, so authentication is undesirable.
There's really no code I can show here because I'm just grabbing the data via the URI; I have the same problem (the 404) when using the explorer tool in the API docs. However, as you might expect, when I authenticate with that explorer tool, the events appear with no problems.
Sample item from the eventList:
{
"kind": "calendar#event",
"id": "(idremoved)",
"status": "confirmed",
"updated": "2012-05-29T21:06:42.000Z",
"start": {
"dateTime": "2012-06-18T19:00:00-05:00"
},
"end": {
"dateTime": "2012-06-18T21:00:00-05:00"
},
"visibility": "public"
}
I'm using the following to read Google Apps for Education calendars, which has the same api and security restrictions as for Business.
After getting the public calendar address, I decided to parse the full version of the calendar instead of the basic version:
https://www.google.com/calendar/feeds/your_calendar_id_here%40gmail.com/public/full
from what I've seen if your calendar is public, your events will be as well. You will want to make sure that the public for your calendar is accessible in your browser by just pasting the url. Check that events are also public by doing that as well. Make sure that the calendar is public but the "Share only my free/busy information (Hide details)" box is unchecked