homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / WebmasterWorld / Website Analytics - Tracking and Logging
Forum Library, Charter, Moderators: Receptional & mademetop

Website Analytics - Tracking and Logging Forum

Qrcode tracking

 6:09 am on Dec 19, 2012 (gmt 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)

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.



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

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:
# 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)

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)

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.

Global Options:
 top home search open messages active posts  

Home / Forums Index / WebmasterWorld / Website Analytics - Tracking and Logging
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved