Created
August 31, 2015 17:00
-
-
Save nickkoskowski/32ab3d2f0daac7df7ed1 to your computer and use it in GitHub Desktop.
For encoding tracking parameters using hitpath.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function get_c1() { | |
| if (isset($_REQUEST['c1'])) { | |
| $c1 = $_REQUEST['c1']; | |
| return $c1; | |
| } | |
| } | |
| function get_c2() { | |
| if (isset($_REQUEST['c2'])) { | |
| $c2 = $_REQUEST['c2']; | |
| return $c2; | |
| } | |
| } | |
| function get_c3() { | |
| if (isset($_REQUEST['c3'])) { | |
| $c3 = $_REQUEST['c3']; | |
| return $c3; | |
| } | |
| } | |
| function get_affID() { | |
| $default = '370432'; | |
| if (isset($_REQUEST['affid'])) { | |
| $affid = $_REQUEST['affid']; | |
| return $affid; | |
| } | |
| else { | |
| return $default; | |
| } | |
| } | |
| function encodeTrackingParameters() { | |
| $tpl = '?affid='.get_affID().'&c1='.get_c1().'&c2='.get_c2().'&c3='.get_c3(); | |
| return $tpl; | |
| } | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment