PHP Tracking Code Now Available - Say Goodbye to JavaScript Tracking

php-click-precision

At Click Precision, we search for the best ways to accommodate different tracking scenarios. We are pleased to announce that there is an alternative to JavaScript tracking at Click Precision! Most browsers have JavaScript enabled, but depending on your use of the platform, this can come in handy for some circumstances. JavaScript tracking is also available, but we are leaving you with 2 wonderful choices.

ClickPrecision_Connect.php can be included for regular tracking, from your conversion pages, or where sub-id's are used for revenue reporting for outbound clicks, such as affiliate links with delayed reporting.

Ideally, these variables will be set dynamically with the product and category data from your own database. You can also set these manually.

Tutorial

The following variables need to be set to properly communicate with the Click Precision SEM Platform.

Step 1: Download the files after logging in at https://clickprecision.com/Manage/Account.php?menu=trackingSetup

Step 2: Open your config file ClickPrecision_Config.php and modify the values.

Step 3:Upload the 2 .php files to your server in the directory where the conversion takes place. If there are muliple directory locations, you will need to modify the "require" line to reflect the directory.

Step 4: Place the example code below in your conversion page.

REQUIRED FOR CONVERSION TRACKING

$productID You will need to specify a product ID. This can be any number, but should remain consistent to the product. The platform will show useful data such as clicks on the link, which products did the best on what pages, etc.

If you have fixed conversion actions, such as filling out a form, then you can use different IDs that you choose. I.E. 1 for contact form, 2 for joining a email list, etc  If you use a database with lots of products or offer ID's, we highly recommend that you create this dynamically. This will keep everything automated and save you valuable time.

OPTIONAL CONVERSION TRACKING & OUTBOUND LINK SUB-ID CONVERSION FOR DELAYED REPORTING

$externalURL Any established affiliate portal will use sub-id tracking. All networks are free to use what they want, so depending on the affiliate network you are using, they will be different.

Add the sub-id variable that you are using at https://clickprecision.com/Manage/Account.php?menu=trackingSetup and fill in the $externalURL value, such as subid as used in this example. It will become something like http://affiliatenetwork.com/?f=2590&aff=2324126&d=35t3&subid=341122purl2432ui241 that will become the variable $newTrackingURL that you can use to redirect.

With this power, you can now track the traffic source and import revenue twice a day if your network is API enabled. For example, a Google Adwords keyword, a referral from another site or organic traffic that triggered the sale or outbound click.

$productName The name of the product or action. If you use a database with lots of product or offer names, we highly recommend that you create this dynamically.

$productValue Total amount of the sale if not delayed reporting. With or without decimals.

$categoryID You can specify a category ID. This can be any number, but should remain consistent to the product. If this is empty, but a product ID is assigned, you can specify the name in the platform

 

Example PHP Usage:

Site tracking without a conversion

<?php
$clientGroupID = 123;
$clientDomainId = 456;
require "ClickPrecision_Connect.php";
?>

 

Tracking with a conversion and outbound affiliate link for delayed reporting

<?php
$clientGroupID = 123;
$clientDomainId = 456;
$productID = 5;
$externalURL = "http://affiliatelink.com/?f=2590&aff=2326&d=353&subid=";
$productName = "Shoe Shining Kits";
require "ClickPrecision_Connect.php";
?>

 

Tracking with a conversion such as a shopping cart system

<?php
$clientGroupID = 123;
$clientDomainId = 456;
$productID = 5;
$productName = "Shoe Shining Kits";
$productValue = 25.95;
require "ClickPrecision_Connect.php";
?>

 

0
Should Local Small Businesses Buy Online Ads?
 

Comments

No comments made yet. Be the first to submit a comment
Already Registered? Login Here
Guest
Friday, 15 December 2017
If you'd like to register, please fill in the username, password and name fields.