Welcome to WebmasterWorld Guest from 54.211.82.105

Forum Moderators: DixonJones & mademetop

Message Too Old, No Replies

Qrcode tracking

     
6:09 am on Dec 19, 2012 (gmt 0)

New User

5+ Year Member

joined:Apr 13, 2011
posts:1
votes: 0


I am making some qrcodes for a client that will link to his website. I want to track the different placements of them (one will be on a brochure and others will be placed at his booth at trades shows). My thought was to have the qrcodes go to different pages that then redirect by php header to the index of the site, ie qrcode on the brochure goes to domain.com/broch2012.php which has a php header location to index.php.

When I tested this over a couple days I noticed the broch2012.php in the recent visitors stats but that page was not showing up in AWstats. 2 questions:

1) does header redirects not get placed in the AWstats data?
2) Is there a better way to do what I am trying to do without using third party sites or qrcode generators (ones that do link tracking)?
3:49 am on Dec 25, 2012 (gmt 0)

Moderator from GB 

WebmasterWorld Administrator mack is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:June 15, 2001
posts:7617
votes: 21


It wont show in Awstats because the header info hasn't been sent, before your code to place the header (redirect)

If I'm wrong please correct me...

What I would do is send all qr traffic to example.com/qr.php but pass a numerical value with each. For example a poster advert would go to example.com/qr.php?source=1

magazine example.com/qr.php?source=2

then within that php file get the post data...

$source = $_GET['source']

save the source to a database then do the redirect

in terms of data what I would do is have a database with a table called for example "inbound"

id : sourcenumber: total

select * from inbound where sourcenumber = '$source' ;

get the current value for total and add 1

update inbound set total = 'newtotal' where sourcenumber = '$source'

Hope this gives you some ideas.

Mack.
6:24 am on Dec 25, 2012 (gmt 0)

Administrator

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
posts:10596
votes: 22


welcome to WebmasterWorld, oab2!

you might want to look through the AWStats Documentation - Configuration directives and parameters:
http://awstats.sourceforge.net/docs/awstats_config.html [awstats.sourceforge.net]

specifically you might be interested in this section:
http://awstats.sourceforge.net/docs/awstats_config.html#ValidHTTPCodes
# By default, AWStats considers that records found in log file are successful
# hits if HTTP code returned by server is a valid HTTP code (200 and 304).
# Any other code are reported in HTTP error chart.
# However in some specific environment, with web server HTTP redirection,
# you can choose to also accept other codes.
11:29 am on Dec 26, 2012 (gmt 0)

Junior Member

10+ Year Member

joined:Aug 19, 2006
posts: 169
votes: 0


I'd just use the simplest solution and add hashtags onto the urls you're encoding in the qr codes, eg example.com#brochure and you can see and easily interpret the sources.
11:46 pm on Dec 26, 2012 (gmt 0)

Administrator

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
posts:10596
votes: 22


the "hashtags" are actually document fragment identifiers.
as such the fragment identifier is not sent with the requested url to the server.
a fragment identifier appended to the current url would send no request to the server and would be handled entirely by the browser.