Jump to content
Cloudverz

Google Adwords Conversion Tracking Code WHMCS

Recommended Posts

Hi, 

I am Running Google Ads campaign To promote My hosting Service.

I Want To Put Conversion Tracking Code On Conversion Page (i.e Thank you Page Or Order Complete page)

As Per My Knowledge, Order Complete page is http://www.websitename.com/WHMCSpath/cart.php?a=complete

Can Any One Help How To put conversion Code Now ??

Also, I Am Promoting Free One Month Trial So There Might Be Chance That User Don't Go to Payment Gateway Page He Is Directly redirected to Complete Order Page.

My payment Method Include - Wallet(After Payment from a wallet I accept The Order manually) & Payment Gateway. In Short, I want to track The User Sign Up Source and Order Source
 

Share this post


Link to post
Share on other sites
On 02/01/2019 at 05:07, Cloudverz said:

Can Any One Help How To put conversion Code Now ??

perhaps the post below will help...

though i'd probably use a ShoppingCartCheckoutCompletePage action hook instead...you might as well try to add your code directly to the template, and then it if works, try getting the hook to add the code instead.

you might also want to take a look at the Google Analytics Enhanced E-commerce for WHMCS addon module from Marketplace in case that is of assistance too.

Share this post


Link to post
Share on other sites

I was having the same problem until recently. Google Ads now recommends the conversion code be placed in the head tag, but, that doesn't mesh so well with a global include. However, I am seeing connectivity through the complete.tpl integral method that is referred to above. Hope that helps. Works for me. Thanks!

Share this post


Link to post
Share on other sites
13 hours ago, rockhost said:

I was having the same problem until recently. Google Ads now recommends the conversion code be placed in the head tag, but, that doesn't mesh so well with a global include.

then you could use one of the output hooks - footer or head.... if I recall correctly, the original whmcs Google Analytics addon used a footer output hook.

Share this post


Link to post
Share on other sites

i am also looking this solution actually..

this sample for our google ads code and need to put inside <head>

 

<script async src="https://www.googletagmanager.com/gtag/js?id=AW-xxxxxx"></script>
    <script>
      window.dataLayer = window.dataLayer || [];
      function gtag(){dataLayer.push(arguments);}
      gtag('js', new Date());

      gtag('config', 'AW-xxxxx');
    </script>

 

when i put in header.tpl inside <head> tag..

and seems the whmcs structure become messy

any idea?

Share this post


Link to post
Share on other sites
5 hours ago, hendranata said:

i am also looking this solution actually..

this sample for our google ads code and need to put inside <head>

 

<script async src="https://www.googletagmanager.com/gtag/js?id=AW-xxxxxx"></script>
    <script>
      window.dataLayer = window.dataLayer || [];
      function gtag(){dataLayer.push(arguments);}
      gtag('js', new Date());

      gtag('config', 'AW-xxxxx');
    </script>

 

when i put in header.tpl inside <head> tag..

and seems the whmcs structure become messy

any idea?

You will have to correct the smarty errors, cause {} brackets will return errors on tpl. Try to break the gtag() function to new lines or use {literal}{/literal}

Share this post


Link to post
Share on other sites
22 minutes ago, pRieStaKos said:

You will have to correct the smarty errors, cause {} brackets will return errors on tpl. Try to break the gtag() function to new lines or use {literal}{/literal}

thanks your solution..

however do u know how do we put together google ads + google analytics ? best practice please.. 

{literal}

<script async src="https://www.googletagmanager.com/gtag/js?id=UA-xxxx-1"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'UA-xxxx-1');
  gtag('config', 'AW-yyyy');
</script>

{/literal}

 

is it like that?

Edited by hendranata

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated