Analytics
2.5K members online now
2.5K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
 
Guide Me
star_border
Reply

e-commerce data with monsterinsights and tag manager

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi I have a wordpress website with the monsterinsights plugin for tracking. Now I want to track e-commerce and installed a cross domain tracking with google

tag manager. The stats in GA are all coming in, but I dont get any data from the shop which is an external url. E-Commerce is enabled in GA. I am not sure if

it's a problem with variable __gaTracker and ga

 

Would appreciate any suggestion. Thanks.

following the source code which is generated by monsterinsights.

<!-- This site uses the Google Analytics by MonsterInsights plugin v6.2.0 - Using Analytics tracking - https://www.monsterinsights.com/ -->
<script type="text/javascript" data-cfasync="false">
/* Function to detect opted out users */
function __gaTrackerIsOptedOut() {
return document.cookie.indexOf(disableStr + '=true') > -1;
}
/* Disable tracking if the opt-out cookie exists. */
var disableStr = 'ga-disable-UA-XXXXXXXX-X';
if ( __gaTrackerIsOptedOut() ) {
window[disableStr] = true;
}
/* Opt-out function */
function __gaTrackerOptout() {
document.cookie = disableStr + '=true; expires=Thu, 31 Dec 2099 23:59:59 UTC; path=/';
window[disableStr] = true;
}
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','__gaTracker');
__gaTracker('create', 'UA-XXXXXXXX-X', 'auto', {'allowLinker':true});
__gaTracker('set', 'forceSSL', true);
__gaTracker('require', 'displayfeatures');
__gaTracker('require', 'linker');
__gaTracker('linker:autoLink', ['urlx.com'] );
__gaTracker('send','pageview');

 

1 Expert replyverified_user
1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author Josef S
July

e-commerce data with monsterinsights and tag manager

Rising Star
# 8
Rising Star

Josef,

 

It wont work without the UA#.    If that's auto generated by the site then there may be a field in which you add the UA#.  If not edit the code or ask them to do so.

 

-Theo

Analytics Evangelist at MoreVisibility | Contact Me
Connect on LinkedIn

View solution in original post

e-commerce data with monsterinsights and tag manager

Rising Star
# 2
Rising Star

Josef,

 

Do you have the GA Tracking Code on the third party site?

 

Best,

 

Theo Bennett

Analytics Evangelist at MoreVisibility | Contact Me
Connect on LinkedIn

Re: e-commerce data with monsterinsights and tag manager

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Dear Theo

Thanks for your reply. Yes, on the third party is the following code snippet:

     /*Added to check for the google Analytics code*/
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');  ga('create', '', 'auto', {'allowLinker': true}); ga('require', 'displayfeatures'); ga('require', 'linker'); ga('require', 'linkid', 'linkid.js'); ga('linker:autoLink', ['my-site-url'] ); ga('send', 'pageview');

could this be the problem of the variable __gaTracker and ga ?

 

 

e-commerce data with monsterinsights and tag manager

Rising Star
# 4
Rising Star

Josef,

 

You have a named tracker on your site and one that is not named on the other which could be causing issues with attribution.  That said, your code here is missing the account and property but I imagine that you left that out on purpose.  

 

With all of that you should still be getting data.  Go to the Chrome store and install the tag assistant plug in to see exactly how everything is being tracked site to site.

 

https://chrome.google.com/webstore/detail/tag-assistant-by-google/kejbdjndbnbjgmefkgdddjlbokphdefk?h...

 

Best,

 

Theo Bennett

Analytics Evangelist at MoreVisibility | Contact Me
Connect on LinkedIn

Re: e-commerce data with monsterinsights and tag manager

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭

Hi

First, thanks for your patience and help. I really appreciate it. 

It's not on purpose to leave the UA-ID. 

Regarding the named tracker: I checked websites with the same system. They have their UA-ID on the third party sides, which is missing with me. So your first point seems to be correct.

I checked with the tag assistent: No tags found on the third party side. When I get to the third party side from my website. But I see tags when I get to the third party side from another website which is using their system.

 

What I am doing wrog that the third party side is not receiving my UA-ID?

 

I also removed the old plugin and installed a new one, the following code should be correct

  ga('create', 'UA-XXXXXXXX-X', 'auto', {'allowLinker': true});
  ga('require', 'linker');
  ga('linker:autoLink', ['my-website-url']);
  ga('require', 'displayfeatures');
  ga('send', 'pageview');

 

e-commerce data with monsterinsights and tag manager

Rising Star
# 6
Rising Star

Josef,

 

So you did not leave it out.. okay well that was a problem.  Smiley Happy

 

Is the code you have here from the third party site?  And the UA # matches yours? 

 

-Theo

Analytics Evangelist at MoreVisibility | Contact Me
Connect on LinkedIn

Re: e-commerce data with monsterinsights and tag manager

Visitor ✭ ✭ ✭
# 7
Visitor ✭ ✭ ✭

The third party side code: You see my UA#  is missing.

     /*Added to check for the google Analytics code*/
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');  
ga('create', '', 'auto', {'allowLinker': true}); ga('require', 'displayfeatures'); ga('require', 'linker'); ga('require', 'linkid', 'linkid.js'); ga('linker:autoLink', ['my-correct-website-url'] ); ga('send', 'pageview');

 

Marked as Best Answer.
Solution
Accepted by topic author Josef S
July

e-commerce data with monsterinsights and tag manager

Rising Star
# 8
Rising Star

Josef,

 

It wont work without the UA#.    If that's auto generated by the site then there may be a field in which you add the UA#.  If not edit the code or ask them to do so.

 

-Theo

Analytics Evangelist at MoreVisibility | Contact Me
Connect on LinkedIn

e-commerce data with monsterinsights and tag manager

Visitor ✭ ✭ ✭
# 9
Visitor ✭ ✭ ✭

Hi Theo

You were right. They haven't had the UA integrated and had to add it manually. Now I have the UA on the third party side. thanks for your help. Regarding the ga vs __gaTracker (monsterinsights) I changed to another plugin. Now also the variable is correct, even this shouldnt be a problem I wanted to be on the safe side :-). Thanks for your help.

e-commerce data with monsterinsights and tag manager

Rising Star
# 10
Rising Star

No worries, glad you have data!

 

Cheers,

 

Theo

Analytics Evangelist at MoreVisibility | Contact Me
Connect on LinkedIn