Unable to pass eVar value when use s.tl as send beacon - adobe

Would like to get some help over here regarding Adobe Analytics
I am not able to get the value I've set for eVar13 when I chose send beacon s.tl
s.tl(): Send data to Adobe Analytics and do not treat it as a page view but when choose s.t s.t(): Send data to Adobe Analytics and treat it as page view, eVar13 works fine and able to get what i want
here's my code to set variable when click on some button:
s.pageName = 'campaign:help-page';
s.eVar13 = s.pageName;
s.eVar31 = "Policy File";
setEvent("event4");
s.linkTrackVars = "eVar13,eVar31,events";
s.linkTrackEvents = "event4";
I even console logged the s.eVar13 and s.pageName
both of them showed campaign:help-page

Send beacon in custom code only.
s.tl(thi,"o", s.eVar13 );
Detailed information tl-method - Adobe

Related

Find Updated events from Google Watch Push Notification Response

I have created a watch Channel on my calender and I am successfully receiving all updates from Google PUSH Notifcation.
But I am not able to use that response to get craeted/updated events.
I read few docs and SO questions that I need to use X-Goog-Resource-ID from the response and hit events list API.
But value of this X-Goog-Resource-ID is neither a calender id and neither it is a event id so how can I use this in events list API ?
I am using Python and Service Account for the integration.
Documentaion :
https://googleapis.github.io/google-api-python-client/docs/dyn/calendar_v3.events.html#list
https://developers.google.com/calendar/api/guides/push#making-watch-requests
Response from PUSH :
"X-Goog-Channel-Expiration": "",
"X-Goog-Channel-ID": "",
"X-Goog-Channel-Token": "",
"X-Goog-Message-Number": "",
"X-Goog-Resource-ID": <resource id>,
"X-Goog-Resource-State": "exists",
"X-Goog-Resource-URI": <calender UI>
Google Functions I tried using :
service = build('calendar', 'v3', credentials=credentials)
service.calendars().get(calendarId=X-Goog-Resource-ID).execute()
service.events().list(calendarId=calenderId', eventId=X-Goog-Resource-ID).execute()
Is their any ref Python Example of using digesting Calender PUSH Notification or which API/Function I need to call with what oaarms to get the created/updated events ?
The X-Goog-Resource-ID header holds a value that identifies that particular resource across the APIs. The whole push notifications basically informs you that something has changed on that calendar.
Now if you want to know exactly what changed, I strongly advise you to perform a synchronisation. One way to do this is to perform a full synchronisation and store the nextSyncToken. Then, when you receive a push notification telling you about a change in the calendar, you only have to use the syncToken to know what has changed since your last synchronisation. You can see a working full example on the linked docs.
UPDATE
If you are watching multiple calendars through push notifications, you will need a system in place to track which calendar is being modified at a time. The X-Goog-Resource-ID header maps with the Calendar ID, and it can be used along syncToken to run a events.list() request to receive the updated events.

Bosun: Save Information using post url and the get the same information and use it in template

We have a notification which will post data to an application using the application end point.
notification ABC{
post = savedetailsurl
body = {{.|json}}
useBody = true
}
So the end point will save all the details in mysql DB.
Now in our template we call another end point to get the details which we saved using the webhook in notification.
template ABC {
use the " getDetailsUrl" and use the details in forming the email
}
Now the problem is race condition. Sometimes the details are not saved yet in the backend (mysql), and getDetailsUrl is called. So we get the empty result.
Is there are way to solve the race condition.
Bosun's notification system is designed to be very basic. If you want something more advanced you will need to use a separate system to generate the notification details and/or handle the alert workflow. Some people have used pagerduty or other monitoring systems like Shinken to do more advanced notifications or alert management.
Your best bet is to skip the built in notifications and do everything in a external system. You can still use the http://bosun.org/api to integrate with the various alert states (crit/warn/ack/close/etc) or you can change your alerts to use log = true to bypass all the built in states and create your own workflow.

Google analytics push custom channel grouping

Is it possible to push custom channel group into Google analytics in a similar way as events? For events I use this code:
_gaq.push(['_trackEvent', 'Popup - displayed', 'Popup displayed - Popup Id 5', 'This is popup title']);
Now I want to push new custom channel group Popup displayed each time user get served popup so I can compare results with Organic search without popup, Direct traffic without popup with organic search with popup.
I would like to accomplish something like this:
Tnx!
With the current Google Analytics version you could use a set call with your tracker object to overwrite campaign data and then create a custom channel definition that matches your custom data:
trackers = ga.getAll();
tracker = trackers[0];
tracker.set('campaignMedium', 'withPopup');
No idea how you would do this with your version of Analytics which is deprecated. Also this may have side effects (like loosing the original campaign data).
However you may simply create two segments, one for users who have seen the event and those who have not. Since you can select multiple segments this allows for a comparison without changing anything in the code.

Google Form email notification

I'm looking to have the information submitted on a google form to be on the email notification that I receive. I have tried several things but I can't seem to get it to work. Any ideas?
Create a new form in Google Docs, if you haven’t done that yet, add the necessary fields to the form and save your changes. Now go back to Google Docs and open the spreadsheet corresponding to that particular form.
Choose Tools > Notification rules... and select the option that says Notify me when... A user submits a form. You can also set how frequently you would like to be notified – right away or with daily digest.
Reference: https://support.google.com/docs/answer/91588
To get the notification in your email, you can refer to the this Google add-on.
Also to enable the data or responses to appear in notification you have to enter a script in the form. which basically tries to extract the columns from the spreadsheet. Sample:
var p = SpreadsheetApp.getActiveSheet();
var column = p.getRange(1,1,1,s.getLastColumn()).getValues()[0];
I hope you build the script by yourself!

Google Analytics Get Custom Dimension After Setting One

In Google Analytics, after setting a custom dimension via:
var tracker = ga.getAll()[0];
tracker.set('dimension1', 'myCustomValue');
tracker.send('pageview');
I'd like to then GET the custom dimension value for that user when a user navigates to another page, via something like:
var tracker = ga.getAll()[0];
var dimension1_value = tracker.get('dimension1'); // 'myCustomValue'
Is there a way to do this?
There is no way native to Google Analytics to do this. Values are not stored in cookies anymore and there is no backchannel to the analytics server, get after set only works on the same page.
But of course nothing stops you from setting your own cookie/session storage and store the value(s) there (but then you knew that).

Resources