AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

Analytics
4.6K members online now
4.6K 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

Cross domain tracking to portion of third party site

[ Edited ]
Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi All

I have a site that is divided up in to a number of sub sites, along the lines of

domain.com/implementationA

domain.com/implementationB

domain.com/implementationC

Each implementation is tracked by a single generic GA property to track overall site usage.

Additionally, pages in each implementation has requests tracked against the clients individual GA property too.  The code for this is currently something like this:

    <script type="text/javascript">
        var _gaq = _gaq || [];
        _gaq.push(['_setAccount', 'UA-12345678-1']);
        _gaq.push(['_setDomainName', 'domain.com']);
        _gaq.push(['_setAllowLinker', 'true']);
        _gaq.push(['_trackPageview']);

        _gaq.push(['sd._setAccount', 'UA-2234567-1']);
        _gaq.push(['sd._setDomainName', 'domain.com']);
_gaq.push(['sd._setAllowLinker', 'true']); _gaq.push(['sd._trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src=('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script>

Everything is being tracked properly.

 

The problem I'm having is that clients, under their GA view are getting errors reported saying that pages in other client implementations that they should not see information about have no valid tracking code.

 

Is there something I'm doing wrong here?  From what I've read it seems that the set up is correct for this use case.

 

Thanks in advance!

 

Andrew

 

 

1 Expert replyverified_user

Re: Cross domain tracking to portion of third party site

Rising Star
# 2
Rising Star
Hi Andrew,

First of all if the top level domain is all the same as you say (domain.com) then you don't need cross domain and what you are actually doing is dual tracking. That said, I would recommend doing this in GTM and with Universal, campaign attribution is much more reliable that way and it's much easier as GTM uses a private tracker by default.

Lastly, they will still see this alert regardless of how you code it because GA is crawling the entire site whenever it's seeing referrals from the other sections that are not commonly coded or just as part of the QA system. If you don't want them to see the messaging, then don't give them edit access and they wont see it.

Best,

Theo Bennett
Analytics Evangelist at MoreVisibility | Contact Me
Connect on LinkedIn

Re: Cross domain tracking to portion of third party site

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭
Hi Theo

Thanks for the response.

The clients use their own GA property on their own website primarily. We offer a service that sits alongside their website. They link off to us and want to continue to track their clients travels across our site. Equally, users will often land on our site and either hit a couple of pages and leave as they have what they need, or migrate through to the clients own site.

We need to track usage of our own site for all the obvious reasons but clients also need to see usage on (only) their portion of our site too for equally obvious reasons.

We could give them access to a portion of our own account easily enough but they want to see the usage on their own websites property linked across our site so they can track their own campaigns and paths etc.

Does that make sense?

Thanks

Re: Cross domain tracking to portion of third party site

Rising Star
# 4
Rising Star
Hi Andrew,

It does. For cross domain to work properly using async you have to code all links and forms to and from the domains. Not fun. Smiley Happy Sounds like you already know that. In this case, since the client has their own account, you are not going to be able to stop them from getting messages or control their access. Sounds like you are saying that they are seeing messages for your roll up tracker though, yes? I have access to many dual tracked implementations (all using Universal as it's much easier) and have not seen that, that is strange and sounds like unexpected behavior.

Best,

Theo Bennett
Analytics Evangelist at MoreVisibility | Contact Me
Connect on LinkedIn

Re: Cross domain tracking to portion of third party site

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭
Yes, that's exactly it.

They are seeing messages saying that pages on the site are missing their tracking code. That's true, but it's also deliberate, as these pages are versions of the site that are provided to other clients. We could look at alternative domains for each client, but what I don't know is are they getting these messages because these other pages are on the same domain, or because these other pages are being tracked by our roll up (nice term) tracker. Because of that I don't know if separate domains would help. We could also use a separate property ourselves for each version of the site - not ideal as we'd rather see all the traffic ourselves in one place.

It may be there's nothing that can be done at all of course!

Thanks

Re: Cross domain tracking to portion of third party site

Rising Star
# 6
Rising Star
Hey Andrew,

I would only expect to see that if the clients code was also on your site, and it sounds like that is what's happening. That said, there is no way to opt out of this now and even so, it would need the client to take action.

Seems like you've got a corner case that was probably not considered.

-Theo
Analytics Evangelist at MoreVisibility | Contact Me
Connect on LinkedIn

Re: Cross domain tracking to portion of third party site

Visitor ✭ ✭ ✭
# 7
Visitor ✭ ✭ ✭
Thanks again Theo,

It sounds like they are just going to have to ignore the alerts!

Andrew

Re: Cross domain tracking to portion of third party site

Visitor ✭ ✭ ✭
# 8
Visitor ✭ ✭ ✭
You can look at two options 1 if you own all Privacy and cache creations with the domains rules of purchase will allow the All Purpose Interface(API) with the certain types of information that can be developed. 2nd Is create an Stream Cache for only the domain you own creating secret API and excessable API for Public URL aka https:// website "Domain" offering public,private and confidential information Web-Browser.