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

Can someone help me with this: add a JavaScript that must be called after your Website was rendered?

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭
Hello,
 
I installed goals  inside GA for a website but GA only attributes conversions to the channel referral. This means that the Ga_cookie information isn't transferred from one domain (our website), to the other domain (iframe-xing) and then back to the website.  According to Xing a referrer tracking code in javascript can be installed and then it will work. But there is a sentence " after your website is rendered"? That I don't understand. What is this principle? How can I implement it? Or is it perhaps standard implemented?  

This is the transcript btw: Google provides a dedicated function to do this and you will need to replace the IFrames URL with the result of that function call via JavaScript. Copy the integration code from the administration area in XING Events and paste it into your website. Now add a JavaScript that must be called after your Website was rendered. Here you will need to add the ID of the IFrame (e.g. _amiandoIFrame24678668CTfliMk) and the URL of the IFrame (both can be found in the integration code copied from XING Events):
var iframe = document.getElementById('_amiandoIFrame24678668CTfliMk');
iframe.src=pageTracker._getLinkerUrl('https://de.xing-events.com/EventIdentifier.html?viewType=iframe&distributionChannel=CHANNEL_IFRAME&u...')
 
Thank you
1 Expert replyverified_user
1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author brechtfrissen
July 2016

Re: Can someone help me with this: add a JavaScript that must be called after your Website was rende

Top Contributor
# 4
Top Contributor
"after the website is rendered" means that all elements in the page's HTML are loaded and executed.
That's the moment when the page is done loading, essentially.

If you use standard HTML, you can use the BODY onload attribute.
If you work with jQuery, you can use document.ready to identify when your page is rendered.
If you use Google Tag Manager, this is handled by the GTM event gtm.load.

I hope that helped.

VP & Chief Evangelist at Hub'Scan | Contact me
Level 80 Digital Analytics Warrior, KPI Therapist and Keeper of the One True Tagging Plan

View solution in original post

Re: Can someone help me with this: add a JavaScript that must be called after your Website was rende

Top Contributor
# 2
Top Contributor
So what are you asking exactly?
VP & Chief Evangelist at Hub'Scan | Contact me
Level 80 Digital Analytics Warrior, KPI Therapist and Keeper of the One True Tagging Plan

Re: Can someone help me with this: add a JavaScript that must be called after your Website was rende

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭
But there is a sentence " after your website is rendered"? That I don't understand. What is this principle? How can I implement it? Or is it perhaps standard implemented for each website?
Marked as Best Answer.
Solution
Accepted by topic author brechtfrissen
July 2016

Re: Can someone help me with this: add a JavaScript that must be called after your Website was rende

Top Contributor
# 4
Top Contributor
"after the website is rendered" means that all elements in the page's HTML are loaded and executed.
That's the moment when the page is done loading, essentially.

If you use standard HTML, you can use the BODY onload attribute.
If you work with jQuery, you can use document.ready to identify when your page is rendered.
If you use Google Tag Manager, this is handled by the GTM event gtm.load.

I hope that helped.

VP & Chief Evangelist at Hub'Scan | Contact me
Level 80 Digital Analytics Warrior, KPI Therapist and Keeper of the One True Tagging Plan