• Home
  • About
    • Sitemap
My Webmaster Tips

Tips on various webmaster programming and SEO.

  • Design
  • SEO
  • Software
  • Code

Sep
3

How to add Google Analytics tracking code to Post Affiliate Pro 4

Google Analytics graph.I know what you’re thinking, it can’t really be that difficult to add Google Analytics javascript tracking code to Post Affiliate Pro 4 (PAP4). When I first attempted to add my tracking code to the site. I got an error message and I didn’t know why I was getting one.

My original suspicion was that a variable in my Google Analytics code was conflicting with a variable in my Post Affiliate Pro 4 software. Well, I’m writing this article to tell you I was completely wrong about that one.

The real reason for the error is a whole lot simpler to solve than you think. After submitting a support ticket to Post Affiliate Pro’s help center, I got a reply back a few days later. I was told the reason why the Google Analytics code was causing errors was because of the way I was putting the code into the site.

PAP4 uses smarty syntax templates and you can’t just add Google Analytics code into pages as is. You’ll need to surround the Google Analytics code with the following tags:

{literal}{/literal}

I got more good news for you. There are only two spots you’ll need to add your Google Analytics tracking script code. Once in the footer.stpl file in the affiliates area and one more in the footer.stpl on the sign up form. You don’t need to track the merchant area, because that’s just you.

Having Google track your affiliate program will decrease the bounce rate of your website. Affiliate will come back to your site over and over again to track their earnings and stay logged in a lot of times. This will show Google that your website has more relevance than a regular old static website.

You could manually input the code on your sever, but Post Affiliate Pro 4 makes it really easy to edit the footer.stpl files right from your merchant back office.

Just go to Configuration, Affiliate Sign up, Custom Design, then Edit Footer for the sign up form.

Go to Configuration, Affiliate Panel, Customize Design, then Edit Footer to put the code in the affiliate area.

Simply put the javascript code at the bottom of both footer.stpl files. Your code will look like this (note: my tracker ID has been covered):

{literal}
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-317xxxx-1");
pageTracker._trackPageview();
} catch(err) {}</script>
{/literal}

Related Posts:

  • How to use javascript to make your GetResponse subscription form check fields
  • How to align Chikita ads better on your WordPress blog
  • Properly set up your WordPress blog for seo, speed, monetization, traffic, and the minimum required plugins and sites you’ll need to make it happen
  • How to add Alertpay as a pay out option in Post Affiliate Pro
  • List of 14 WordPress plugins your blog should have installed

Tags: Affiliate Program, Affiliates Area, Decrease Bounce Rate, Error Message, Footer.stpl, Google Analytics, Javascript Tracking Code, Merchant Area, PAP4, Post Affiliate Pro 4, Sign Up Form, Smarty Syntax, Templates, Tracking Code, Variable

Posted by mywebmastertips Post Affiliate Pro Subscribe to RSS feed



2 Comments to “How to add Google Analytics tracking code to Post Affiliate Pro 4”

  1. Andrew Hallock says:
    October 12, 2009 at 10:28 am

    Thanks for the tip–it worked great!

    [Reply]

  2. Scarlett says:
    October 20, 2010 at 8:50 am

    Thanks, this is exactly what we need! Now we can start our AdStyles Fashion Program with the correct tracking … Cheers, Scarlett

    [Reply]

Leave a Reply

Click here to cancel reply.

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Click to cancel reply


Categories

  • Code
    • CSS
    • HTML
    • JavaScript
    • MySQL
    • PHP
  • Design
    • Browsers
  • SEO
    • Advertising
  • Software
    • Getresponse
    • Post Affiliate Pro
    • Simple Machines Forum
    • Wordpress

Popular Posts

  • How to fix Ping.fm WordPress plugin if it doesn’t add triggers 13 comment(s)
  • Examples on how to follow new FTC guidelines for bloggers 10 comment(s)
  • The importance of making your WordPress author comment urls open in a new window and the code to make it happen 9 comment(s)
  • How to remove – index from SMF Forum home page title 5 comment(s)
  • CSS versus HTML tables for page layouts 5 comment(s)



RSS | Sitemap | Disclosures
Facebook Facebook Twitter Twitter Youtube Youtube LinkedIn LinkedIn Myspace Myspace More More
grab this
Copyright © 2012 My Webmaster Tips All rights reserved. Blue Grace theme by Vladimir Prelovac.