I am trying to determine the best way to redirect affiliate links and have the ability to track the clicks. I would like to be able to create url aliases for each affiliate link and track the clicks to these links through google analytics if possible. There are three methods I have been trying to get this to work.
1. Path Redirect - Creating a url redirect using path redirect works to redirect the link and create an alias but from what I can tell, there is no way to track these clicks through analytics. If there is, this would be the ideal route to take.
2. Bouncer Module - I am currently using the bouncer module. This allows me to track the clicks from within drupal, but not through analytics. Also, when a user hovers over the link, they are able to see the original affiliate link, which really defeats the purpose.
3. The third method I am trying involves creating a drupal page specifically for each redirect and inserting the following php code directly into the body of the page. This method does seem to meet all my requirements (creation of url alias and ability to track through google analytics by accessing the "top content" report).
<?php
ob_start();
header("Location: affililateurlhere");
ob_flush();
?>
My questions: Am I missing any other modules or ways to accomplish this? Could I run into any problems using the third method?
I really appreciate any help or advice.
Comments
Take a look at the Affiliates
Take a look at the Affiliates module.
There is also an Affiliate module which is pretty much unmaintained, but it's code is simple enough, so it can be used as a starting point, if the Affiliates module doesn't suit you.
From what I can tell, these
From what I can tell, these affiliate modules are more for ecommerce type sites that want to offer an affiliate program to their users.
I just need a way to "cloak" or mask my affiliate links (to other sites) and track the results.
After more testing, it doesn't look like method 3 above works for me either as visits to the pages are not showing in google analytics. I guess the redirect happens before google analytics ever knows somebody tried to access the page.
There has be way to track these links through google analytics, but I can't figure it out.
I think the Landing Page
I think the Landing Page module comes closest to what I need.
I still can't track the links using google analytics, but this landing page module allows me to set up separate pages for each affiliate link, add a redirect to the page, and record all clicks to that page to the database.
The module does not offer any reporting in backend, but the click information is stored in the database. I really don't know what I'm doing with php or sql, but I was able to create a block to display the click information from the database. I'm sure there is a better way to do this, but this is what I can up with.
Hopefully this is of help to someone or a better solution is posted.
Hi, I'm also interested. Very
Hi, I'm also interested. Very strange there is no module for this!!
Very common for sites to use a redirect script, often with tracking before the user is sent out, to not display the affiliate links, and for SEO purposes as well.
Hopefully there's a solution for this soon!
Seems like http://drupal.org/project/links might have this functionality. They do mention link tracking, from both the link and node levels (since you can use the same link in different places with this module)
Also mentions using masked links like example.com/goto/url/x/y/z whatever here: http://drupal.org/node/146956
Hi lemmers... I'm also trying
Hi lemmers... I'm also trying to figure out a way to do this...
I think method 3 would work nice.. But why do you need google analytics? You could use internal drupal statistics. Create the pages a a special content type and then create a Views page displaying the count of page views of that content type. You could create a CCK link field and then displaying the URL of the affiliate links along with the node views. And sort it by name or by views or whatever. I think I'm going to try it...
subscribing
subscribing
try _trackPageview()
First of all...I don't think that your method 3 will work. PHP won't let you redirect to a new location after the header data has already been sent (ie...by the drupal wrapper loading before your content loads). This means you will most likely get a php error if you try and run that php in the content of a node.
What I do, and what would be nice if a module could do, is create a real folder on my host like '/recommended/affiliateproduct/' and then put a index.php file in that folder with
then I just link to the folder (assuming your host defaults to loading index.php files) like "check out www.example.com/recommended/product1" or whatever.
And then to track the pageview in GA, check out this google help article to track outbound links http://www.google.com/support/googleanalytics/bin/answer.py?answer=55527...
hopefully this helps!
Hi... Try this module... it
Hi... Try this module... it works well
http://drupal.org/project/gotwo
hedac
If Im not mistaken, that seems to work exactly like the click bouncer module. So one can see the url they are going to end up on in the link.
I wish there was a module that not only redirected and tracked affiliate links, but MASKED them as well. Something like the WP-affiliate plugin for wordpress. Im learning php, but Im such a noob I wouldnt be able to write something like that now. I bet drupal would be picked up by a lot more by affiliate marketers if such a module existed.
I ended up using Path
I ended up using Path redirect http://drupal.org/project/path_redirect
with a patch to count clicks http://drupal.org/node/265299
Hi Hedac, can you explain
Hi Hedac, can you explain roughly what you did to achieve what you wanted?
In my case I have thousands of links to mask, and wouldn't do it manually. I have path redirect installed and I use it for 301 redirects. Would I have to manually create an alias each time I create a node that needs link tracking/masking/redirecting?
I just use Path Redirect...
I just use Path Redirect... The only thing I did is to add the counter so I can have some stats of used links.
and yes.. I have to manually create the redirect each time I want to put a new link opening the redirects page in a new tab while editing the node.
in your case I guess you would have to program a script to search for your links and add redirects automatically and modify your existing links to the new redirects, because doing it manually at once can be a pain.
Seems useless for affiliate marketers
The problem is that if I use a shareasale or cj.com datafeed to populate my site with say 45,000 products, path redirect seems completely useless. The link bouncer module works great in that it gives you the ability to track clicks and it does it automatically, but it doesnt cloak the link...so everyone on earth can see my affiliate ID etc.
Again, I wish I was a programmer. In my opinion, not having something like this for drupal is a big reason why joomla and wordpress are more popular with online publishers, who are trying to make some money online.
Hi, I work on
Hi,
I work on Affiliate-NG.
Can you drop by and open a new issue there, detailing the features you need and the flow you would like to see?
Im confused...
Im not sure what your module does from the link you provided. Is it for merchants that need a system to manage their affiliates? Im an affiliate that sells other peoples products on my content sites, that wishes to mask my affiliate id from the world and track my traffic going out, so I can see what my conversions are with the merchants products Im sending traffic.
Subscribing I too have a
Subscribing
I too have a number of WP sites with 1000's of affiliate product links on them. After making a site for a client using Drupal I am keen to move my affiliate stuff over to this platform - however I need to have the functionality you are asking for in this thread.
Very interested to hear of any solutions that are out there.
S
subscribing...
subscribing...
Drupal developer and consultant
http://www.mikestiv.com
Found Something
I was looking for the exact same thing and came across this other thread:
http://groups.drupal.org/node/109079
A commenter suggested the gotwo module. I installed it last weekend. It cloaks links, redirects them and counts clicks. Looking at the stat counter, if you use a different tracking ID for each outgoing link it will keep separate stats for them. In other words if two or more links are using the exact same outgoing url it will count the clicks together but if you add a distinct tracking ID to each url it will track them separately. It doesn't integrate with google analytics.
It's built into statistics
If you have statistics enabled, you can view the Top Pages report and see how many page views happened. If you've setup a URL redirect (e.g. /jobs to /careers), it will show a hit for both. That way, if you create a redirect for a specific campaign that you want to track, you can see how many arrived at the destination through the redirect url.
What about more than one
What about more than one redirect to the same URL? Will it be a hit on the PageRank for our site? In addition to the Top Pages report, would Google Analytics still track this?
digibrill tic
Subscribe
Very interested in this as well.
Hi, Wouldn't feeds tamper
Hi,
Wouldn't feeds tamper (http://drupal.org/project/feeds_tamper) with tinyurl usage maybe be a solution.
I am not a programmer. But a feeds tamper submodule which tinyurl-ed a affiliate link would be a great advantage in this perspective I think!
Thanks a lot in advance for considering this!
Greetings, Martijn
Hi, I am trying this with
Hi,
I am trying this with shorturl, link and custom formatters on D7. See my attemp on: http://drupal.org/node/1379704#comment-5400646
But until now, no go. Can somebody help with this please?
Greetings, Martijn
Why wouldn't you just use
Why wouldn't you just use google analytics? You can create custom tracking URL's- so each link you put out shows up as a separate campaign. It will then show you demographics and specific details for each campaign- as well as overall. This is the easiest- and most straight-forward way to get the results you are seeking.
No offense, because I do love Drupal, but I have yet to find anything even comparable to the depth and detail of analytics. It has been an INVALUABLE tool for our websites. Custom URL's has been wonderful to track different forum signatures, where they don't allow affiliate links etc...