How To Track Anything With Google Analytics Event Tracking

A lot of you have asked me how I track things like affiliate link clicks, email signups and such things with Google Analytics.

The short answer is with Google Analytics event tracking!

So I decided to put a quick Google Analytics event tracking tutorial together to show you how you can do the same.

What You Will Learn

  • How to track anything with Google Analytics
  • Including affiliate clicks, email sign ups, shopping funnels & more
  • How to setup event tracking & goal tracking
  • All of my Google Analytics event tracking best practices
  • How to work out the monetary value of a conversion easily
  • Get access to my personal custom Google Analytics report

My previous tutorial will also teach you how to increase traffic with Google Analytics.

Google Analytics Event Tracking Tutorial

Don’t worry it is much easier than you think! Just follow along with my live Google Analytics event tracking example-

Essentially you can track anything that happens on a website from someone click on a link to someone converting as an email subscription.

Here is a basic example of how to use event tracking to track affiliate links-

The default Google Analytics event tracking code looks like this-

onclick="_gaq.push(['_trackEvent', 'category', 'action', 'label']);"

We want to replace 3 values-

  • Category – The category/type of event, e.g. Affiliate Click
  • Action – Give the action a name, eg click (I use affiliate programme name here)
  • Label – Anything else you want to include (I use the page URL)

So track an affiliate link click for Ahrefs on the tools of the trade page it would look like this-

onclick="_gaq.push(['_trackEvent', 'Affiliate', 'Ahrefs', '/tools-of-the-trade/']);"

Now we just need to add it to our usual affiliate link that looks like this-

<a href="">Ahrefs</a>

Which ends up looking like this-

<a href="">Ahrefs</a>

Everytime someone clicks on that affiliate link, Google Analytics event tracking will log it was an affiliate link click for Ahrefs and the page it came from.

Please see the video for more detailed setup instructions and learn how to track other things like email subscriptions, signups & shopping carts!

Custom Reporting With Events & Goals

Once setup you can create custom reports that tell you a bunch of things like-

  • Which traffic source sent the most opt in conversions
  • Which page converts the most affiliate clicks
  • Which affiliate program is performing the best for which traffic source

This is what my custom Google Analytics event tracking report looks like (you can get it below)-

Google Analytics event tracking tutorial example report

Straight away you can see 10.9% of traffic from the WarriorForum signs up to my email list while only 3.4% do from TrafficPlanet.

Equally you can see 46.1% of YouTube traffic clicks an affiliate link compared to just 25.8% from BlackHatWorld.

Take a look at this post to learn more about why that is important to know!

171 Responses

  1. Ollie Farese

    Excellent information again. I am looking forward for more updates.

    • Matthew Woodward
      August 27th, 2018 at 10:20 am

      Cheers Ollie

  2. Khushboo Somani

    Thanks for sharing this technique. Actually, I am really finding great techniques in using Google Analytics. I want to experience more the benefits of this tracking tool aside from traffic tracking.

    • Matthew Woodward
      February 25th, 2017 at 7:15 am

      Well there are a ton of awesome Google Analytics hacks out there!

  3. Kwasi Enoch

    Great, I’ve learned so much from this blog post and it’s amazing.

    • Matthew Woodward
      December 31st, 2016 at 2:08 pm

      I hope it helps you to grow :)

  4. Abuzar Ghaffari

    Great Matt….
    This very excited and very helpful for me particularly…..

    • Matthew Woodward
      September 1st, 2016 at 3:07 pm

      No problem Abuzzar!

  5. Joshua Zong

    HI Matt,

    As a suggestion (not sure if it was mentioned above when I skimmed the comments), you may want to look into working with Google TagManager to set up the link tracking. I have found it can help streamline a lot of work in the long run. I use a combination of Analytics, TagManager, and Webmaster tools for much of my work alongside XML-Sitemaps and the usual browser developer tools. Definitely useful for Analysis and SEO.

    Anyways, Cheers! (and thanks for the posts)

  6. Sumit Kumar


    Can I track banner event click to conversion in google analytics ? Actually I have places banner click event code in my website for some banners and now I just want to track the total number of successful order people did after clicking that particular banner. It will be a great help if you can tell me the processor of doing that.


    • Matthew Woodward
      June 13th, 2016 at 9:56 am

      For that you would need to use Google Analytics Ecommerce tracking as well

  7. khalifa

    thanks for this great article
    i have quick question pleas
    i have a blog that promote many amazon products , how can track which the most page or a link that drive me the most sales in amazon affiliate ? is there any way to set goals in GA to see the best page or link on GA ?
    thanks again for this article

    • Matthew Woodward
      May 5th, 2016 at 10:24 am

      I don’t know if its possible on a page level with Amazon without creating seperate tracking ID’s manually

  8. David

    It is the same Mathew.
    Now we just need to add it to our usual affiliate link that looks like this-
    Which ends up looking like this-

    Although i can read the correct example in your youtube video :)
    just want to let you know :D

    • Matthew Woodward
      March 31st, 2016 at 11:59 am

      I think the WP comment system is stripping out your code =\

      • David
        March 31st, 2016 at 12:04 pm
        • Matthew Woodward
          March 31st, 2016 at 6:45 pm

          It looks the same?

          • just helping
            September 2nd, 2016 at 8:58 am

            looks the same for me as well the google code is lost

  9. Charles

    I am still new to this and learning about setting up Google Analytics. Was wondering if you can direct me to any posts or videos for beginners you may have, where I can learn about Analytics and its setup?

  10. Nas

    How do u put onclick on a embeded youtube video. Do u have an example

    • Matthew Woodward
      December 2nd, 2015 at 4:34 pm

      You will have to check out their developer documentation

  11. Ken

    This is only for the older analytics and not Universal Analytics. Is that right?

    • Matthew Woodward
      October 22nd, 2015 at 4:59 pm

      Yes this video is the older one I will update it for universal in due course

  12. Dawn


    Can I track in Google Analytics my affiliates’ opt ins? I see that we can track affiliate clicks but how about for affiliate opt ins?

    • Matthew Woodward
      October 19th, 2015 at 9:57 am

      Can you explain a little more?

      • Dawn
        October 19th, 2015 at 10:19 am

        We have a launch coming up. And we’re planning to give out prizes to our affiliate partners in a contest for opt ins, not only on sales. We have ClickBank but they can only track sales. We’re finding ways on how to track opt ins for our affiliate partners and wondering if we can track opt ins through Google Analytics. I can see from the video that we can track affiliate clicks but can we track visitors who opt in from their referral links?

        • Matthew Woodward
          October 19th, 2015 at 10:29 am

          Yes if your affiliate links had Google Analytics campaign tracking tagged on the URLs

          • Dawn
            October 19th, 2015 at 10:34 am

            Thank you! Just wondering, do you have a tutorial on how to do this? Sorry, it’s crazy busy over here. I hope you can help me out :)

          • Matthew Woodward
            October 19th, 2015 at 10:34 am

            Google ‘Google Analytics Campaign Tracking’

  13. Vishal Shah

    Hi Matthew, Nicely explained into the video, but I have doubt, what exact values I should put if I want to track videos on my blogs, and If I have videos on multiple pages I should set up all individually or it could set up once? Please advice.

    • Matthew Woodward
      October 19th, 2015 at 9:59 am

      You dont have to put a value

  14. Barry


    I tried getting the report after sharing on google+ and when I clicked on the link it didn’t work. Please let me know.

    Also do you know how to track on Facebook using google analytics?


    • Matthew Woodward
      October 1st, 2015 at 3:32 pm

      Ooops sorry about that I have updated the link

      What do you want to track with Facebook?

  15. John

    Hi Matthew,

    Looks like the download link after liking it on facebook isn’t working, error below.

    404. That’s an error.

    The requested URL /get/analytics/web/template?uid=rxVEopOSQayvcQ6gp6ZmyQ was not found on this server. That’s all we know.

    • Matthew Woodward
      October 1st, 2015 at 3:34 pm

      Sorry fixed that up :)

  16. solanki kajal

    Hi Matthew,

    wow! this is an incredible post ,this will help to learn a lot about how to track anything with google analytics. Thank you for putting all these at one place for easy reference.

    Thank You

    Best Regards

    • Matthew Woodward
      August 14th, 2015 at 8:43 am

      No problem :)

  17. Krishna


    I have applied event tracking to ecommerce website, thank you.

    I have one requirement like, I want to create a user and give access to view only particular event category.

    Example: I want to create ‘testUser’, this user have access to view only ‘amazon’ events not other event category. And we want to give these user details to ‘amazon’, so that it will be clear to amazon that our website is navigated the urls. Is this is way to send the reports to amazon.

    Please guide me.

    Thanks in Advance,

    • Matthew Woodward
      July 27th, 2015 at 11:43 am

      You would need to build something that uses the Google Analytics API to do that

  18. Rik399


    New to GA…

    Is it me or do the following look the same?

    Now we just need to add it to our usual affiliate link that looks like this-


    Which ends up looking like this-


    • Matthew Woodward
      July 16th, 2015 at 10:09 am

      I’m not sure what you mean

  19. Gareth Bull

    Superb, just applied this to a couple of my ecommerce sites, thanks Matt!

    • Matthew Woodward
      July 13th, 2015 at 2:48 pm

      No problemo :)

  20. krishna

    Hi Matthew,

    I am trying to setup google analytics for one website, that displays different products(like TV, laptops, tablets..) from different wesites(amazon, flipkart..), If we select the product it will redirect to that website.

    I want to track the visit of the websites and products. Can you help me out how to track?

    Many Thanks in Advance,

    • Matthew Woodward
      July 6th, 2015 at 9:16 am

      You need onclick tracking on the button that takes them from your site to the other sites

      • krishna
        July 6th, 2015 at 1:19 pm

        Thank You Matthew for the prompt reply.

        Do you have any videos for ‘onclick tracking’ and how to setup?

        Actually we are dynamically binding the products, so are we able to apply this onClick tracking for this?

        Many Thanks in Advance,

        • krishna
          July 6th, 2015 at 1:25 pm


          We are writing entire website code in HTML and JavaScript.


        • Matthew Woodward
          July 6th, 2015 at 4:45 pm

          I am not a developer sorry

          • krishna
            July 7th, 2015 at 8:30 pm

            Thanks for the reply Matthew.

            Is it required to create goals after creating events?


          • Matthew Woodward
            July 8th, 2015 at 10:40 am

            If you want to track events as goals, yes

  21. Ben

    Hi Matthew,
    I went through a load of my articles and added the Event tracking code, then went back in to see WordPress had stripped the onclick stuff out.

    How do you stop WordPress stripping it out and leaving it alone?

    Many thanks

    • Matthew Woodward
      June 4th, 2015 at 2:29 pm

      I guess you use the visual editor? I never touch it

      • Bianca Oldenbeuving
        July 30th, 2015 at 2:21 pm

        I was trying to find out why the code wasn’t working (or at least I wasn’t getting any results in GA). When I read the question above, I went to check, and yes: the code got filtered out, somehow! Any idea how to get the code in, without losing it?

  22. Sumita

    Hi Matthew,

    I have a question. i dont understand why after every code u had wrote “1.00,true” what does it mean???

    i want to track E Mailer. So how can i track that.

    onClick=”_gaq.push([‘_trackEvent’, ‘Emailler’, ‘click’, ‘BANNERNAME/url’);”

    onClick=”_gaq.push([‘_trackEvent’, ‘Emailler’, ‘click’, ‘BANNERNAME/url’,1.00,true);”

    • Matthew Woodward
      April 9th, 2015 at 5:15 am

      That sets the value of the event

  23. emily

    tried adding Event Tracking to various place on the following page but none are being tracked:

    Are you able to see what the issue is and if the tracking code has been added correctly/incorrectly?

    • Matthew Woodward
      April 6th, 2015 at 9:22 am

      You can use the Google Analytics Debugger Chrome extension to see why its not working

      • emily
        April 8th, 2015 at 1:45 am

        Thank You Matthew Woodward.

  24. Fernando

    Great post Matthew.

    Small question, how do you track email subscriptions that come from popups?


  25. Toby

    Thanks for the great tutorial Matt.

    Do you know of any WP plugins that can automate adding the tracking code values to links? I’m thinking of something similar to ThirstyAffiliates, which I’m already using for affiliate links.


    • Matthew Woodward
      February 10th, 2015 at 8:05 am

      ThirstyAffiliates can do it natively

  26. Craig

    Hi Matt,
    Tracking affiliate links still works right?
    I’m having trouble getting it to work, but not just if something is conflicting with something, or perhaps because the links are PrettyLin links.

    • Matthew Woodward
      February 6th, 2015 at 8:14 am

      Yeah it does no problem

      • Craig
        February 7th, 2015 at 11:34 am

        Finally, figure it out.
        I was using “Google Analytics by Yoast”, for some reason the code you have above and code i found on other sites didn’t work.

        I had to use the following code:
        onclick="__gaTracker('send', 'event', 'affiliate link', 'product name', '/url-slug/');" rel="nofollow" target="_blank"

        Not sure if code will display in comment so here is screen shot.

        Thanks again.

        • Matthew Woodward
          February 8th, 2015 at 11:45 am

          Are you using legacy or universal analytics?

          • Craig
            February 9th, 2015 at 10:27 am

            Using universal, but for some reason only the code I posted works with Yoast.
            Even the code generated with wouldn’t work.

          • Matthew Woodward
            February 11th, 2015 at 9:56 am

            There is a very handy Google Analytics debugger addon from Chrome that might help you out

        • Jody
          March 19th, 2015 at 5:46 am

          I’ve had a similar issue as well. I’m using Yoast for SEO and Analytics, but not all of my affiliate links are being tracked with the filter you can configure to track internal links as external links.

          I came here to find a workaround, so thanks for the comment. I’ll give it a try.

  27. Abhay

    When I add event tracking code in WP text editor and switch back to visual editor, WP automatically strips out that code. Do you know why that’s happening? My wp is up to date.

    • Matthew Woodward
      February 3rd, 2015 at 11:11 am

      I never use the visual editor

      • Abhay
        February 3rd, 2015 at 11:16 am

        That’s strange! But then what do you do if you need to add a shortcode or something using the navigation that we see in visual editor?

        • Matthew Woodward
          February 3rd, 2015 at 12:42 pm

          I just write the code

  28. Craig

    Great video Matt,

    Do you know if it’s possible to add an event to an embedded youtube video, to track how many people press play?

    I’m going to look into this now, but figured I’d ask here too.

  29. Darrel Andrews

    WOW! Thanks for showing us how to use Google Analytics like a pro!

    This is exactly what I need to do on my blog, your email happened to pop up at the right time, too.

    • Matthew Woodward
      January 5th, 2015 at 11:07 am

      Hahaha funny how that works out sometimes!

  30. Chaz A

    Hi Matt,

    Awesome tutorial. This cleared up a few things from the Analytics front.

    We have our own landing page which we drive ppc traffic, and the thing that I’m pretty stuck on at the moment is how to track conversions (postback/pixel fire on affiliate link LP) and attributing them back to the keywords that generated the conversions in the first place from adwords.

    Lets say we are using our own affiliate tracking platform such as HasOffers, how can I dynamically populate the keywords into the affiliate links and postbacks/pixels?

    Do you have any suggestions on this?

  31. Will

    Hi Matt, awesome guide, is it possible to use the affiliate tracking code for image clicks (banners) (in wordpress that go to custom urls) that redirect to the affiliate page?
    Thanks for your help dude.

    • Matthew Woodward
      September 29th, 2014 at 4:17 pm

      You sure can – you can add the code to pretty much anything!

  32. lee

    Hi Matt,

    Is it possible to track Contact Form Submission as the last step in a funnel WITHOUT a thank you page? That is, I have 2 Google AdWords Campaigns, each with their own landing page. I set up the goal to track from AdWords to the landing page to the Contact page but I cannot tell if the contact form page was submitted as there is no subsequent thank you page – only text that pops up on the contact page. If I set up an event I can’t add it to the end of the previously described funnel, cany I?

    • Matthew Woodward
      August 20th, 2014 at 3:07 pm

      Hmmm I think if you got the submit button to fire off an event, you can set that up as a goal

  33. Paul Ray

    Hi Matt,

    Whats the best way to add events to a wordpress website. Everytime i change it in my posts it gets reset by the WYSIWYG editor. The only solution I came up with is use a plugin like Google Analytic Events or using RawHTML to prevent it from changing. Thoughts?

    • Matthew Woodward
      August 14th, 2014 at 5:19 pm

      I don’t use the WYSIWYG editor personally =/

  34. David Longacre

    Hey Matthew,

    I had this tutorial bookmarked. Went back to into implemented the tactics. Then realized after 2 weeks of not checking. This is the old way and this doesnt work with Universal Analytics. Would you mind doing an update with the new version?

    • Matthew Woodward
      July 25th, 2014 at 4:17 pm

      Ahhh I haven’t moved to universal myself yet sorry, but I will update it when I do :)

  35. Ravi C

    What is the plugin you are using for the popup that comes to subscribe to your blog? I really like it..

  36. Felix Albutra

    Hello Matthew,

    I find your video is really helpful to me. But still got one more question. I want to track the click events of my “Submit Form Button” which I used a third-party service like MachForm.

    How am I going to track that or simply how am I going to paste the tracking code inside the webpage?

    Please help me and thank you very much for the help.

    – Felix

    • Matthew Woodward
      April 30th, 2014 at 6:22 pm

      You will have to ask MachForm devs about that if you cant control the code

      • Felix Albutra
        April 30th, 2014 at 7:01 pm

        After the creation of the form, their form editor will then generate the codes for me to paste it in my webpage. I am thinking what part of script I will paste the tracking code.

        • Matthew Woodward
          May 1st, 2014 at 7:00 am

          You need a developers/coders help for that

  37. claude

    Hi Matthew,

    Very good your video about tracking anything with Google Analytics… What’s about google “no provided” issue.


    • Matthew Woodward
      March 28th, 2014 at 9:03 am

      Nothing we can do about that – keywords are so 2012 anyway :P

  38. Matt

    Glad you mentioned that as I was wondering the same thing.

    I’m new to GA, so I don’t want to assume, but the way I’m interpreting it this is the “old” (ga.js) code:
    ga(‘send’, ‘event’, ‘category’, ‘action’);

    …and this would be the “new” Universal Analytics (analytics.js) code:
    onclick=”_gaq.push([‘_trackEvent’, ‘category’, ‘action’, ‘label’]);”

    Please correct me if I’m wrong. :) Thanks in advance!

    • Matt
      March 19th, 2014 at 3:16 pm

      Sorry, swap the two lines of code so top is new and bottom is old (changed the wording/structure of the post midway through).

  39. Rachel Saunders

    Hi Mathew sorry just wondering how come you mention affiliates wouldn’t have thought it would be as relevant…

    • Matthew Woodward
      March 14th, 2014 at 10:18 am

      I’m a full time affiliate ^^

  40. Matthew Woodward


    Yes I will do at some point

  41. Matthew

    Hi, Matthew.

    How can one get in contact with you? what’s the best way

    I have some questions regarding ‘How To Track Anything With Google Analytics’.

    I;m new to GA and so my questions would be elementary and possibly boring for you so you obviously don’t have to answer them if you don’t want to although it would really help me with conquering the learning curve

  42. Rajesh

    I didn’t found custom report

    • Matthew Woodward
      March 6th, 2014 at 8:01 am

      Try reading the post properly

  43. Mark

    Interesting stuff matthew however I got confused why you have mentioned you put affiliate links as event AND goals. ?

    • Matthew Woodward
      February 24th, 2014 at 9:32 am

      An event is basically just a fabricated pageview.

      If you want to measure conversion rates/conversion value etc then you need to map an event as a goal

  44. Matthew Woodward

    Thats what we are doing :)

  45. Ken McMahon

    Hi matt. I left a comment on the youtube video, but I’m reposting here in case you miss it. I’d really like to know the answer to this!

    How would this work with an iframe Amazon affiliate link that looks like the one below? There’s no html outbound link as such to which the analytics code can be attached.


    • Matthew Woodward
      February 8th, 2014 at 9:41 am

      YouTube really made a mess with the comment management/moderation with the Google+ integration so its likely I missed it sorry.

      Why would you use an iframe?

      • Ken McMahon
        February 8th, 2014 at 9:50 am

        That’s the format that Amazon uses for its enhanaced links. The specific ones I want to track are like those on this page

        Thanks for the quick response :)

        • Matthew Woodward
          February 10th, 2014 at 11:34 am

          Ahhh I see – I don’t think so, perhaps you could add the onclick event to the java easy enoguh but im not a coder. I bet someone on fiverr could drop it in though.

          • Ken McMahon
            February 14th, 2014 at 9:17 am

            Thanks, It’s the one piece of info I could really do with, so I’ll try and find a way. I’ll leave a comment if I manage to find anything worthwhile.

          • Matthew Woodward
            February 15th, 2014 at 8:00 pm

            Just outsource it – anyone that knows code thats like a 30 second job

  46. Panks

    Hay Matthew ,

    I am doing each and every step as you mentioned , can you please take a look on my Download button and verify it if i have put right code .

    Site is

    One more thing what i have to do to track event for different page , i mean if i have multiple page and i want to tack my download button then on every page i have to put the same code or i need to change something in tracking code. Should i have to create different Events and setup different Goal for every page.

    Please guide


    • Matthew Woodward
      February 4th, 2014 at 9:58 am

      Looks ok to me, just check the data comes into analytics tomorrow.

      I’m not a coder by any stretch!

      You should read the official documentation regarding the best way to implement it.

  47. Panks

    Hey thanks a lot , Lots of info provided you, Its a great help . But you didn’t mention about the downloads .

    Is it right that i will track a download by puting the event code on my Download Button and then set up a goal for thank you page.

    I mean when anybody download my software if fire a event and for the successful installation we have thank you page. So should i have to do that.

    I m still very confused ..

    • Matthew Woodward
      February 3rd, 2014 at 10:08 am


      Just tag them the same as an affiliate link.

  48. Steve

    Tnx nice video, works perfect for me the affiliate clicks. I have one question, at the 3.56 in the video what is the Event Category number 5. Page Exit do? Is the moment when the visitor hit the x button in the browser?

    • Matthew Woodward
      January 17th, 2014 at 11:08 am

      This is how many people left the site at that page.

  49. Damian Appleby

    If you want to add call tracking for free (so you can see call events), you can add a tel: anchor tag round your number and add the event trigger to that – this will only work on smart phones or Skype, but on some the sites I’m involved with that can be as many as 30% of the visitors, so with a little judicious analysis you can pick out the key phrases that have generated telephone calls (along with everything else)

    • Matthew Woodward
      December 18th, 2013 at 10:23 am

      Now that is a sweet tip :)

  50. Casey D

    Just set up your custom report with my analytics. This is something I’ve been wanted to learn but never got around to actually taking the time to learn how to do it.

    Thanks for sharing, Matt!


    • Matthew Woodward
      November 10th, 2013 at 12:39 pm

      No worrys glad it helped you out :)

  51. Promes

    Hi Matt,
    Thanks for an awesome article. I tried to implement the tracking code, but the links I want to track come from shortcoded buttons (example: [large_button color: red link:xxx] ). Do you know how I could manage that without having to lose the shortcodes of my wp theme? Btw, I tried to put the code in the shortcode, but obviously it doesn’t works.

    • Matthew Woodward
      November 11th, 2013 at 10:23 am

      You would need to edit the plugin that you are using for the shortcode

  52. Luigi

    The best video I’ve watch when it comes to this specific topic Goals, Events and funnels.

    I wish I could find a video about how to insert the onclick=”_gaq.push([‘_trackEvent’, ‘Affiliate’, ‘Ahrefs’, ‘/tools-of-the-trade/’]);” code in the actual page.

    Do you know one?

    And thanks again.

    • Matthew Woodward
      October 6th, 2013 at 9:35 am

      The video explains that?

      • luigi
        October 6th, 2013 at 6:05 pm

        But i think it a little bit different depending on the theme you are using for your site. Right?

        • Matthew Woodward
          October 7th, 2013 at 9:08 am

          Nothing to do with theme, just use the post editor that we all have in the back end of worpdress.

  53. Carolyn

    Hi matt,

    How can I set this up to show if my clients SEO is working. They are confused with PPC and SEO and he is spending 4200 a month on PPC also. It has its own landing page and phone number. But, her Analytics report is the standard mess that Google gives you.

    • Matthew Woodward
      September 8th, 2013 at 2:51 pm

      What are the goals of the campaign?

  54. Andrea

    Hey Matt, what did you eat in the morning?? Gallo pinto?? Share your secret please, how can you be so smart?? I have to stop reading your blog, because it make me fill i miss something every day. Thx for your share buddy!!

    • Matthew Woodward
      August 13th, 2013 at 4:18 pm

      Hahah hopefully in a couple more weeks I will be =D

  55. Rencontre

    Thank you for this tutorial. I don’t really track much in general, just use statcounter to see what queries or where the traffic come from.
    But now you convince me to us GA and it’s free. Can’t beat that.

    Question: What is the plugin you use to display the “Subscribe to my award winning blog now” ? I like how it goes down when you scroll.
    ( I subscribed btw : )

  56. Anonymous Affiliate

    Hi Matt

    I have tried to something like this in the past but failed miserably!

    All my affiliate links end “/exit.php’ so I set up a goal in G.A. to record all clicks on URLs containing ‘exit.php’… It’s never recorded a thing.

    Any tips as to how to fix this?


    • Matthew Woodward
      July 16th, 2013 at 8:42 am


      Did you put the analytics tracking code within the exit.php file itself?

      If not it can’t register that page was viewed, you need to setup event tracking as per the tutorial here

      • Anonymous Affiliate
        July 16th, 2013 at 8:47 am

        Ah ok, I didn’t know that.

        That might be one I’ll have to get my developer to try and look at that, unfortunately I am not so technical as to be amending that type of file!

        Thank you

        • Matthew Woodward
          July 22nd, 2013 at 8:32 am

          Let me know if you get stuck!

  57. eman

    Are you okay with Google analytics? A lot of people stay away from it now. I found Piwik and it’s fantastic.

    • Matthew Woodward
      July 15th, 2013 at 7:54 am


      Yeah have used it for years, why wouldn’t you use it?

  58. Iain

    I love this tutorial.

    It something so simple and yet people often forget to do it.

    I mean there was even a part that you forgot to do.

    Goal tracking. It’s so important.

    • Matthew Woodward
      July 15th, 2013 at 11:31 am

      Which part did I forget to do?

  59. toobie

    Hey matt, great post!
    How do you lock your contet with social signals like that?
    Could you please give me a search query or something to start with? :)


  60. Ileane

    Hi Matthew,

    I left this question on Google+ but I’ll also ask it here.

    First off, thanks for the tutorial. I’d like to set up event tracking for when a podcast is played. I have 5 audio podcasts files on one page and I’d like to know which one is being played the most and where the traffic is coming from who actually listen to the podcast. How will I use the event tracking code with the HTML5 iFrame embed? 

  61. Adesanmi Adedotun

    Very nice guideline on to have full access one Google analytics report

    • Matthew Woodward
      July 12th, 2013 at 9:50 am

      Cheers Ade!

  62. Batuhan SASI

    I’m sorry Matt. I cant write php code here. It’s SERVER[REQUEST_URI]

    • Matthew Woodward
      July 12th, 2013 at 9:55 am

      I know what you are getting at, but within posts you can execute PHP by default ^^ I use this trick in my siderbar for the RSS link thoguh

  63. Chris

    Another top post by Matt. It’s always worth being able to track as much as you can on Analytics.

    • Matthew Woodward
      July 12th, 2013 at 9:56 am

      Then you can make awesome posts like the one I’m going to write this afternoon :P

  64. Batuhan SASI

    Hello Matt

    That is AWESOME. I was waiting for this

    Thank you so much


    • Matthew Woodward
      July 6th, 2013 at 7:58 am

      Cheers Batu

      • Batuhan SASI
        July 6th, 2013 at 12:44 pm

        I want to share something for WordPress (aka Php) sites.

        You can use this code for Label .

        onclick=”_gaq.push([‘_trackEvent’, ‘Affiliate’, ‘Amazon’, ”]);”

        • Batuhan SASI
          July 6th, 2013 at 12:45 pm

          onclick=”_gaq.push([‘_trackEvent’, ‘Affiliate’, ‘Amazon’, ”]);”

  65. Frank

    Hi Matt,
    Isn’t this easier with Google’s URL Builder tool? Or is not the same thing?

    • Matthew Woodward
      July 6th, 2013 at 7:59 am


      That is for custom campaign tracking like when you send out an email or buy banner advertising etc

  66. Charles Floate

    Just seen the full video – Like to point out that in the Email Signups Dashboard, your #5 referer was my other site – SerpChirp xD

    • Matthew Woodward
      July 12th, 2013 at 9:57 am

      Winning =D Thanks for the traffickz!

  67. Fernando

    Matt, good post, one thing you should do is track your email links… I noticed you are not doing it… just a suggestion.

    How are you creating the tracking events? Manually or with Yoast SEO plugin?


    • Matthew Woodward
      July 6th, 2013 at 8:01 am


      Yeah my email tracking sucks, I have an old aweber account that doesnt even tell me open rates ^^

      I’m setting it all up manually, Yoast tracks outbound links – but mine redirect through an internal link first

  68. MixerDJ

    Better if you can show How to set up Google Analytics account for web site with video :P

  69. Dean

    dont think the google + share button is working, i shared it and got nothing, the page just reloaded.
    cool tutorial though, im looking forward to trying it out, i want to scale my traffic by buying advertsing slots but I am unsure on how to go about it. this may help a lot.

    • Matthew Woodward
      July 5th, 2013 at 5:55 pm


      Fixed :)

What are your thoughts?

* Name, Email, Comment are Required