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

4.2K members online now
4.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

Customized GA code with client prefix

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi, trying to set-up tracking for the website with integrated 3-rd party reservation systems. Received from them customized tracking code ( below) but after implementation, I can only see data from the reservation system, but nothing from the website.

After checking with Google Tag Assistant, I got the message: "Invalid or missing web property ID"- but the code is there

this is complete code:

<script src="//"></script>
<script type="text/javascript">

(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),

   var tbb_ga = '<UA-72323218-1>';
   var tbb_cid = '<7-days-premium-linz>';
   var tbb_domain = '';

   ga('create', tbb_ga, {'allowLinker': true});
   ga('require', 'linker');
   ga('linker:autoLink', [tbb_domain]);
   ga('send', 'pageview');

   ga(function(tracker) {
      window.linker = window.linker || new window.gaplugins.Linker(tracker);
     if(document.referrer.indexOf(document.domain)!=7) {
       var e = document.createElement('iframe');
       e.setAttribute('style', 'display:none');
       var b = document.getElementsByTagName('body')[0];

   // Automatically apply TBB prefix to thebookingbutton links
         this.href = this.href.replace(new RegExp(tbb_domain+'/properties', 'i'), tbb_domain+'/'+tbb_cid+'/properties');
1 Expert replyverified_user

Re: Customized GA code with client prefix

Top Contributor
# 2
Top Contributor

To fix the issue please change:
var tbb_ga = '<UA-72323218-1>';
var tbb_ga = 'UA-72323218-1';

Hope this helps.

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

Re: Customized GA code with client prefix

Participant ✭ ✭ ✭
# 3
Participant ✭ ✭ ✭

Moving forward
You can easily debug on the website with GA debugger:

You can check in chrome, console tab with 'Preserve log' turned ON.

Best Regards,
GA Guru.

'Star' or 'Accept as Solution' if it helped.