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

Ads
1.4K members online now
1.4K members online now
Use Google Ads conversion tracking and reporting to measure your results. Have a question about Google Analytics? Post it here, on the Google Analytics Community!
Guide Me
star_border
Reply

How to Grab UTM Data when AdWords is Auto-Tagging?

[ Edited ]
Top Contributor
# 1
Top Contributor

Not a convention question but ... 

 

We're using Intercom (a live chat tool) on our corporate website so sometimes people convert during a conversation with one of customer reps. Because of this we don't get to grab their UTM codes in Analytics but we realized we could push their UTM data from paid campaigns into Intercom. 

 

Sooooo here's my issue: While all other PPC Platforms are having their UTM code captured because AdWords is set to auto-tagging it appears that the code below is not succeeding in grabbing the UTM code. 

 

Question: How can i identify and capture that UTM code without disabling Auto-Taging (I can't disable auto-taging because of the time saving and I lose some keyword match data as well!).

 

The code i use to capture the UTM is below if this can help at all ... 

 

ps. please feel free to use this code if you're running PPC campaigns and Intercom as well Smiley Happy

 

Code Below: 

<script>
function getUrlTrackingParameterByName(name) {
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
results = regex.exec(location.search);
return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
}
/* Replace 'APP_ID' with your app ID */
window.intercomSettings = {
app_id: 'here is the app code id',
"utm_source": getUrlTrackingParameterByName('utm_source') || null,
"utm_medium": getUrlTrackingParameterByName('utm_medium') || null,
"utm_term": getUrlTrackingParameterByName('utm_term') || null,
"utm_content": getUrlTrackingParameterByName('utm_content') || null,
"utm_campaign": getUrlTrackingParameterByName('utm_campaign') || null,
"so_referrer": document.referrer || null
};

Joshua, Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’
2 Expert replyverified_user

Re: How to Grab UTM Data when AdWords is Auto-Tagging?

Top Contributor
# 2
Top Contributor

Ohhh... We need the help of a programming specialist on this;

@Dave_Davis ?

Moshe, AdWords Top Contributor , Twitter | Linkedin | Community Profile | Ad-Globe
Did you find any helpful responses or answers to your query? If yes, please mark it as the ‘Best Answer’

Re: How to Grab UTM Data when AdWords is Auto-Tagging?

Top Contributor
# 3
Top Contributor
Basically you could sum up my question into: How can i pull gclid data and capture it as UTM data? Is it even possible?
Joshua, Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’