2.2K members online now
2.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

Problem with custom Tracking Script

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi there,


I've got the following custom tracking snippet on a customer's website.


<script type="text/javascript">
if (typeof(tw_gat) == 'object') {
	(function(){ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src='//'; ga.onload = function() { tw_gat.installTrackingHandlers(2); }; ga.onreadystatechange = function() { if (this.readyState in {'loaded': 1, 'complete': 1}) tw_gat.installTrackingHandlers(2); }; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);})();

The customer told me there is no data transferred to Google Analytics, i.e. the dashboard does not show new data since a specific date.


Is there any problem with this custom code?


Thx for your help, Björn

1 Expert replyverified_user

Re: Problem with custom Tracking Script

Top Contributor
# 2
Top Contributor

Can you show a page where this code is implemented? It is not working as is in your post.

Arnold Majlath, Google Analytics Top Contributor
Was my response helpful? If yes, please accept it as solution.
Circle Me On Google+ | Visit me @ Redfly Digital