3

OK this is my situation. I did a lot of reading about GA events and I'm not still quite sure how I will be implementing this. I have a website that is accepting affiliates. I sell lots of genuine products and there quite a number of affiliates joining already.

They requested a way to track the performance of their affiliate links. I am thinking maybe Google Analytics Events tracking is a good solution here. Currently I only provide the affiliate link and URL for them to use, it does not include any GA tracking information.

This what I need to accomplish based:

a.) When their affiliate URL or link sends a visitor to my site, I would like to send an event to their GA account with this information:

  • Landing page
  • Referrer page (so that they know what pages in their sites work best)

b.) When that visitor made a sale on my site, I would like to send another event to my affiliates with this information:

  • Product purchased
  • Language

With those two above information provided to my affiliates coming from the two events; it can help affiliates optimize the way they work with my site.

Possible Solution and Questions

a.) For the first event, I can add a radio button (yes and no answer) on their affiliate account page in my site something like "Enable Google Analytics notifications when we get traffic and purchases from you?".

Then if they answer "yes". I can add onclick events to all tracking links (which they can paste on their website) like this:

_gaq.push([‘_trackEvent’, ’Category’, ’Action’, ’Opt Label’, Opt Value, ’Opt non-interaction’])

Is this the correct solution? Now that we have this event tracking set. They can login to their GA accounts and see what links that goes out as well as the referrer page.

Or is their a way for me to send events to their accounts, such as the landing page information and referrer page?

b.) For the second problem, I still don't have any idea on how to do it.

Any advice would be highly appreciated. Apologies if the solution to this is very easy, I'm more of a web developer/coder and not a marketer or expert in GA.

1
  • Are you trying to send events to Google Analytics account other than your own? Commented Nov 26, 2013 at 17:30

1 Answer 1

1

I just set this up today! Here is the documentation: https://developers.google.com/analytics/devguides/collection/analyticsjs/events

No, you won't be able to send events to your affiliates Google Analytics. You can only send events to your own Google Analytics. It's your site, so you would have the Google code with your user id. All events would go to your Google console. You can't have multiple users tracking the same site in their own console. (You might if you try really hard, but I'm sure Google would disapprove and not support that.)

For a sale event, this is what I used:

-if session[:deposit].to_f > 0
  :javascript
    if (ga!=null) ga('send', 'event', 'user', 'deposit', 'amount', #{session[:deposit].to_f});

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.