Home > Other Systems (CPVLab, iMobiTrax, P202, Track Revenue, Click, Google Analytics, etc.) > The STM Mobile Tracker

STM Mobile Tracker V4 (P202) Geo Parameter Mod - Send the Visitor Country to your LP (7)


07-26-2013 08:48 AM #1 kyuss (Member)
STM Mobile Tracker V4 (P202) Geo Parameter Mod - Send the Visitor Country to your LP

I made this mini mod a while back for the STM Mobile Tracker V4 (P202) and looks like some of you guys would find it useful so here it is.

It will send the country name to your landing page by appending it to your URL during the initial redirect.

When you generate a tracking/redirect link, use the option 'Yes. (GET parameters supported: carrier, brand, os and model)' and '&country=[Country]' will be appended to your URLs.

E.g. 'landingpage.com?subid=1337&country=Australia&carr ier=...etc.'

To mod your installation, all you have to do is edit/replace:
\webapp\tracking202\redirect\tracker.php

I have attached a pre-edited tracker.php file to this post, I couldn't put the whole code up here in text because it was too long.

Alternatively you can make two small changes to the tracker.php file yourself:

First Edit - Find (line 11)

Code:
function setTrackVars(){
	global $mysql;
	global $html;
First Edit - Change to:
Code:
function setTrackVars(){
	global $mysql;
	global $html;
	global $ca;

Second Edit - Find (line 439 or 440, depending on if you have made the first edit):
Code:
$redirect_site_url .= '&t202id='.$tid;
my_log('pass_dev_info to: '.$tracker_row['pass_dev_info']);
if($tracker_row['pass_dev_info']==1){
	$redirect_site_url .= '&carrier='.$html["carrier"].'&brand='.$html["brand"].'&model='.$html["model"].'&os='.$html["os"];
}
Second Edit - Change to:
Code:
$redirect_site_url .= '&t202id='.$tid;
my_log('pass_dev_info to: '.$tracker_row['pass_dev_info']);
if($tracker_row['pass_dev_info']==1){
	$redirect_site_url .= '&country='.$ca.'&carrier='.$html["carrier"].'&brand='.$html["brand"].'&model='.$html["model"].'&os='.$html["os"];
}
Enjoy!


07-26-2013 09:09 AM #2 caurmen (Administrator)

Nice mod!

I continue to be amazed at how much functionality you can add to trackers with just a little bit of modding - definitely worth doing.


07-28-2013 09:38 AM #3 julien (Member)

Awesome, can't wait to test it.
If it works with countries as well, it's just perfect. I'll try that.

Many thanks sir


07-29-2013 03:00 PM #4 kyuss (Member)

@Caurmen - Yeah definitely agree with you, I mean the STM Tracker in itself is an epic mod. I found this thread you started really interesting here. If you have the time, a tutorial on installing Mariadb and hooking it up to the STM Tracker would be massively appreciated!

@Julien - Glad it will be useful man!! Post here if there are any issues with it.


07-30-2013 12:48 AM #5 sarsap (Member)

Now we need some custom mod to add country flags next to the IP in Spy View
Thanks for the share, it shouldn't add much ms to the redirect I assume


07-30-2013 03:09 AM #6 kyuss (Member)

Quote Originally Posted by sarsap View Post
Now we need some custom mod to add country flags next to the IP in Spy View
Thanks for the share, it shouldn't add much ms to the redirect I assume
Yeah that would be sweet, what I'd really like to see is the possibility to add tokens to the custom URLs in the redirector [[c1]] [[c2]] etc. and redirecting to rotating landing pages. I didn't benchmark with or without this mod, but it didn't seem to slow down the redirect at all, the STM Tracker already looks up this geo information for each click, this mod simply grabs that info and appends in to the URL.


07-30-2013 11:21 AM #7 caurmen (Administrator)

a tutorial on installing Mariadb and hooking it up to the STM Tracker would be massively appreciated!
I'll get on that! It's actually REALLY easy to do, though, at least on Debian - the major tricky bit is adding the new repository, after that it's just "apt-get install mariadb".

I'm also still working behind the scenes on the Prosper Speedup Project - talking to a seriously experienced PHP/database guy about it. Just no concrete results so far, which is why I haven't posted on the thread in a while.


Home > Other Systems (CPVLab, iMobiTrax, P202, Track Revenue, Click, Google Analytics, etc.) > The STM Mobile Tracker