BrandNewCongress/DEPRECATED-website

Cross-Domain Tracking in GA Redoux

Closed this issue · 3 comments

@saikat, @patrickmcelwee, @evanhl

Hi Saikat,

Thanks for seeing the previous Google Analytics code was re-pasted. Cross domain tracking involves several steps and is not yet established. In troubleshooting, it appears it will need to be overwritten once more with another iteration of GA code.

The difference is only that "https://secure.actblue.com" has been changed to "actblue.com." This may free the process from a hang-up that's so far prevented it from working, but if not then more troubleshooting will come next.

Please see that the below code completely replaces the existing GA code for BNC.org:

<script>
  (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','https://www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-75845088-1', 'auto', {'allowLinker': true});
  ga('require', 'linker');
  ga('linker:autoLink', ['actblue.com'] );
  ga('send', 'pageview');

</script>

More background can be found here:
https://developers.google.com/analytics/devguides/collection/analyticsjs/cross-domain

Should be done -- try now?

On Fri, Jul 8, 2016 at 5:08 PM kmpcpm notifications@github.com wrote:

@saikat https://github.com/saikat, @patrickmcelwee
https://github.com/patrickmcelwee, @evanhl https://github.com/evanhl

Hi Saikat,

Thanks for seeing the previous Google Analytics code was re-pasted. Cross
domain tracking involves several steps and is not yet established. In
troubleshooting, it appears it will need to be overwritten once more with
another iteration of GA code.

The difference is only that "https://secure.actblue.com" has been changed
to "actblue.com." This may free the process from a hang-up that's so far
prevented it from working, but if not then more troubleshooting will come
next.

Please see that the below code completely replaces the existing GA code
for BNC.org:

<script> (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','https://www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-75845088-1', 'auto', {'allowLinker': true}); ga('require', 'linker'); ga('linker:autoLink', ['actblue.com'] ); ga('send', 'pageview'); </script>

More background can be found here:

https://developers.google.com/analytics/devguides/collection/analyticsjs/cross-domain


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/BrandNewCongress/website/issues/94, or mute the
thread
https://github.com/notifications/unsubscribe/AAFHRpEvD6pTFZv1umFtEZWQiGHa2H--ks5qTnYNgaJpZM4JILDY
.

Hi @saikat ,

Cross domain tracking involves some troubleshooting, and we haven't yet come to full capabilities. It's likely an issue with tag construction which can be tested by re-pasting another tag. There will also be a near-future need to place a Facebook pixel on the BNC site.

In order to streamline everything, please re-paste this one final tag. It's final because it's a container tag administered from Google Tag Manager. When something needs to change, we can change it from that platform without the need to re-paste a new tag as we have been doing.

Please use this to over-write the existing Google Analytics tag.

<!-- Google Tag Manager -->
<noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-WWRN82"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-WWRN82');</script>
<!-- End Google Tag Manager -->

Ok added that.