The Moz Q&A Forum

    • Forum
    • Questions
    • My Q&A
    • Users
    • Ask the Community

    Welcome to the Q&A Forum

    Browse the forum for helpful insights and fresh discussions about all things SEO.

    1. SEO and Digital Marketing Q&A Forum
    2. Categories
    3. Online Marketing Tools
    4. Universal analytics cross-domain tracking setup?

    Universal analytics cross-domain tracking setup?

    Online Marketing Tools
    3 2 1.6k
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as question
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Liamis
      Liamis last edited by

      I'm a bit confused on the implementation aspect for Universal Analytics. Suppose I have a primary domain site (www.abc.com) and utilize a third party to host our shopping cart (www.abc-cart.com).  Both domains have links referring traffic to one another.  Can you tell me if the following cross-domain tracking codes snippets are correct for the primary domain and third party site. Also, do I need to specify the respective domain parameter within the first line of code on both sites? I've seen some sites have the domain parameter removed within ga('create'....

      • Primary domain pages:

      ga('create', 'UA-XXXXXXX-X', 'abc.com', {'allowLinker': true});

      ga('require', 'linker');

      ga('linker:autoLink', ['abc-cart.com']);

      ga('send', 'pageview');

      • Third party domain pages:

      ga(‘create’, 'UA-XXXXXXX-X', 'abc-cart.com' { ‘allowLinker’: true });

      ga('require', 'linker');

      ga('linker:autoLink', ['abc.com']);

      ga('send', 'pageview');

      1 Reply Last reply Reply Quote 1
      • Martijn_Scheijbeler
        Martijn_Scheijbeler last edited by

        Hi Liamis,

        All the tags look good except the fact that:   ga('create', 'UA-XXXXXXX-X', 'abc.com', {'allowLinker': true}); should be without abc.com so:   ga('create', 'UA-XXXXXXX-X', {'allowLinker': true});. I can't find anything in the documentation as well which tells that you should include the domain name there again.

        1 Reply Last reply Reply Quote 2
        • Liamis
          Liamis last edited by

          Thanks Martijn, I figured the domain name doesn't needed to be included, but just wanted to be sure for Universal Analytics.

          Thanks,

          Brian

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post
          • Google Analytics - Track Landing Page Redirects
            LoganRay
            LoganRay
            1
            2
            1.1k

          • Universal Google Analytics Code Migration
            Martijn_Scheijbeler
            Martijn_Scheijbeler
            0
            3
            101

          • Google Analytics - adding tracking codes
            edward-may
            edward-may
            0
            6
            107

          • Universal Analytics and Dynamic Remarketing
            0
            1
            621

          • Marketo Landing pages and tracking in Google Analytics
            john4math
            john4math
            0
            7
            6.8k

          • Host on my Site or a New Domain ( Content / Tutorial / University )
            TakeshiYoung
            TakeshiYoung
            0
            4
            212

          • Moving domain - Google Analytics tracking code
            Richard555
            Richard555
            0
            3
            306

          • Analytics
            GrouchyKids
            GrouchyKids
            0
            5
            531

          Get started with Moz Pro!

          Unlock the power of advanced SEO tools and data-driven insights.

          Start my free trial
          Products
          • Moz Pro
          • Moz Local
          • Moz API
          • Moz Data
          • STAT
          • Product Updates
          Moz Solutions
          • SMB Solutions
          • Agency Solutions
          • Enterprise Solutions
          • Digital Marketers
          Free SEO Tools
          • Domain Authority Checker
          • Link Explorer
          • Keyword Explorer
          • Competitive Research
          • Brand Authority Checker
          • Local Citation Checker
          • MozBar Extension
          • MozCast
          Resources
          • Blog
          • SEO Learning Center
          • Help Hub
          • Beginner's Guide to SEO
          • How-to Guides
          • Moz Academy
          • API Docs
          About Moz
          • About
          • Team
          • Careers
          • Contact
          Why Moz
          • Case Studies
          • Testimonials
          Get Involved
          • Become an Affiliate
          • MozCon
          • Webinars
          • Practical Marketer Series
          • MozPod
          Connect with us

          Contact the Help team

          Join our newsletter
          Moz logo
          © 2021 - 2026 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
          • Accessibility
          • Terms of Use
          • Privacy