GA scrips running with 200 response but /collect API not calling in chrome, Works in firefox, safari

Jigar Pitroda June 5, 2023

Google Analytics scripts are running in Chrome but the script initiator is not calling the /collect API when I am using google analytics in the Jira custom plugin in the Chrome browser. However, it works properly and /collect API is getting called in Firefox and Safari. When I am testing in my local ( Outside the Plugin ) API is getting called in Chrome browser as well. So what is the actual issue? Why /collect API is not getting called in the Jira custom plugin in the "Chrome browser" whereas, in Firefox and Safari, it is working? What things I need to change in my code or Chrome setting so that /collect API will get called by the script initiator?

When I added the "Google Analytics Debugger" extension in my Chrome Get the idea that the cookie was not found. and get me the error like:

Processing commands (1)
Processing data layer push: {event: "gtm.scrollDepth", gtm.scrollThreshold: 90, gtm.scrollUnits: "percent", gtm.scrollDirection: "vertical", gtm.triggers: "5"}
Processing GTAG command: ["event", "scroll", {percent_scrolled: 90, send_to: "G-XXXXXXXXXX"}]


 Generated new client id: 56848XXXX.168596XXXX
 No session cookie found. Generating fresh session object.
 Event processing aborted during storage.

1 answer

1 accepted

0 votes
Answer accepted
David at David Simpson Apps
Atlassian Partner
June 5, 2023

This looks like the same problem as https://github.com/alinemorelli/react-gtm/issues/116 

...the problem is only present on Chromium based browsers.

It looks like the you need to specify the cookie_flags option to track in iframes. e.g.

gtag("config", measurementId, {
cookie_flags: "SameSite=None;Secure", // to allow tracking in iframe
...
});

Perhaps contact Tempo for a fix?

Jigar Pitroda June 6, 2023

Yes, Thank you so much, 

It works now.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events