Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5840663
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T11:46:50+00:00 2026-05-22T11:46:50+00:00

i use Google Analytics with sub-domains and an iframe. The landing page on sub.mydomain.com

  • 0

i use Google Analytics with sub-domains and an iframe.
The landing page on sub.mydomain.com contains an iframe with a registration form on http://www.mydomain.com.

  1. The user clicks a banner sub.mydomain.com/landing?utm_source=so1&utm_medium=dis&utm_campaign=xe1&utm_content=re1

  2. On the landing page, the registration form and the thankyou page this javascript code is used

    var pageTracker = _gat._getTracker("UA-xxxxxx");
    pageTracker._setDomainName(".mydomain.com");
    pageTracker._setAllowHash(false);
    pageTracker._setAllowLinker(true);
    pageTracker._trackPageview();
    

    on the landing page the iframe is loaded in the following way

    
    var iframe = document.getElementById('register_iframe');
    iframe.src = pageTracker._getLinkerUrl('http://www.mydomain.com/register.html');
    

  3. The cookies on sub.mydomain.com and the registration iframe from http://www.mydomain.com both contain _utmz with utmcsr=so1|utmccn=xe1|utmcmd=dis|utmcct=re1

  4. After submitting the the ajax form in the iframe the request for the thankyou page and some new javascript files still transfer the correct set __utmz cookie

  5. the javascript from 2. on the thank you page then requests the __utm.gif but is now transferring .utmcsr=(direct)|utmccn=(direct)|utmcmd=(none) and the cookie on .mydomain.com is set to .utmcsr=(direct)|utmccn=(direct)|utmcmd=(none) too

As far as i know the ga code shouldn't overwrite a direct set source with direct or something else.

Thanks for any help

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T11:46:51+00:00Added an answer on May 22, 2026 at 11:46 am

    If Google Analytics Cross Domain Iframe Tracking is implemented as above, it should work.

    I changed 2 things

    1. I forgot to set in the iframe tracker code pageTracker._setAllowLinker(true);

    2. I used on the landing page, that was hosted on a subdomain pageTracker._setDomainName(“sub.mydomain.com”);
      i changed that to the same as on the main page in the iframe pageTracker._setDomainName(“.mydomain.com”);

    As i understood the documentation that was not necessary, so don’t know if that had an effect.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a website on www.example.com and use Google Analytics. I've also set up
I have a website on www.example.com and use Google Analytics. This website has lots
I'm tring to use com.google.android.apps.analytics.GoogleAnalyticsTracker but got NoClassDefFoundError when GoogleAnalyticsTracker.getInstance(); I'm sure that libGoogleAnalytics.jar
I've been looking to use Google Analytics _gaq.push() function on a single-page JavaScript application
in Google Analytics, if I use _trackEvent, will it increase the page view count?
I am willing to use Google Analytics to track stats about usage of my
Anyone know how to use Google Analytics for a Drupal-powered company intranet site behind
I'm trying to use Google Analytics API to query internal searches that happen on
I must be doing something wrong here. I'm trying to use Google Analytics to
I'm switching over our site to use Asynchronous Google Analytics, and I'm curious about

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.