4.2K members online now
4.2K members online now
Learn how to set up goals and Ecommerce tracking, verify accuracy of attribution traffic sources, and discuss funnel visualization, Multi-Channel Funnels, the Goal Flow Report, and Enhanced Ecommerce
Guide Me

Google Analytics behaving differently in development and production/staging

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

I have one of my projects setup with analytics.js and Enhanced Ecommerce.

My staging site is, and for the site I have the cookie domain (analytics_domain) set to 'none' in development, and 'auto' in staging.

ga('create', analytics_id, analytics_domain);
ga('require', 'ec');

The Enhanced Ecommerce is enabled and setup to track events and transactions.
I have the goals setup, using GA's template for creating an account/purchase, and tracking a specific event.


Behavior problem:



Create an url for a campaign like this:


Create an account and go through purchase.
I have in GA view, 1 create account event, 1 transaction_completed event and on eCommerce 1 purchase.

This is the expected behavior, I can see the events and have the transactions connected to that campaign.



Create an account and go through purchase.
I have in GA view, 1 create account event, 0 transaction_completed event and on eCommerce 0 purchases.

I can see the transactions on staging, I can see all the events, it's just they are not tied to the campaign.

I have created a Site Test, view and I use that code for development and staging. Since they share the same setup for the Google Analytics part I assume I'm not understanding something.


Things I did so far:
- Every test was done in Chrome incognito with no plugin enabled
- Tested the same transaction setup on staging multiple times, results are consistent
- Checked the cookie domain, is on the cookie
- Checked throughout the transaction if the clientId for the user is the same (with analytics debugger), it is the same.


I ran out of ideas and I really need to get this working so I can track paid campaigns.

Thank you very much.