Knowledgebase: Scripts
Login Frequency Marketing Viral Mailer (LFMVM)
Posted by Frank Bauer on 21 April 2015 01:29 AM

The following is how to integrate 4 different Task tracking codes in to the Login Frequency Marketing Viral Mailer (LFMVM) scripts. Please not that the version of your script may vary from this article and the variable as well as placement of the tracking code may need to be different. 

Warning: We highly recommend letting an experienced programmer integrate the codes. Be sure to have a backup of the original file before making changes. We suggest editing files in an editor like TextPad or another 3rd part editor. And we recommend staying away from cPanel editors.

(Our assumption is that in the domain settings within Jollow you've defined the "Unique Identifier" as the User ID/Affiliate ID (likely the same number) of for accounts at your LFMVM website. You can go to 'Domains List' > 'Edit Domain Settings' to view what you have entered.)

Login Task tracking

This will track successful logins to your website through Challenges.

Step 1: Create a Task in Jollow for your LFMVM website using the Task type of 'Login to Account'. Copy the tracking code provided to you at the completion of creating the Task.

Step 2: In a code editor open the members.php file from the main directory of your website files.

Step 3: Locate "//START OTO AND SPO" in the code. A few lines after that will be "$usrid = $_SESSION["userid"];

Step 4: Directly after the "$usrid = $_SESSION["userid"];" line of code paste in your Login Task tracking code and remove the  "<?php" and  "?>" at the beginning and end of the code string. Essentially it should look something like the following:
$jo_error = @file_get_contents("http://jollow.com/tracktask.php?o=1&c=1111111&t=1&d=1&ui=".$jo_ui);

Step 5: In the Login tracking code string you need to define the $jo_ui variable. Using the above integration, in the Jollow code string you would change $jo_ui to $_SESSION["userid"]. Now your code string would be the following: 
$jo_error = @file_get_contents("http://jollow.com/tracktask.php?o=1&c=1111111&t=1&d=1&ui=".$_SESSION["userid"]);

Step 6: Save your changes to the members.php file.

Step 7: Login to your website using the account you put in the 'Test Integration' field when setting up the Task. After logging in, check your 'Tasks List' and it should say 'Active' as a status.

Signup & Referral Task tracking

This will track successful signups and referrals to your website through Challenges.

Step 1: Create a Task in Jollow for your LFMVM website using the Task type of 'Signup to site' and do the same for 'Refer New Members Task type. Copy the tracking code provided to you at the completion of creating the Task.

Step 2: In a code editor (you can usually do this from cPanel, too) open the signup.php file from the main directory of your website files.

Step 3: Locate "// End Promo Code Check" in the code. It may be around line number 315.

Step 4: Directly after that line of code paste in your Signup and/or Referral Task tracking code and remove the  "<?php" and  "?>" at the beginning and end of the code string. Essentially it should look something like 
$jo_error = @file_get_contents("http://jollow.com/tracktask.php?o=1&c=1111111&t=1&d=1&ui=".$jo_ui);

Step 5: Signup tracking code - In the Signup tracking code string you need to define the $jo_ui variable. Using the above integration, in the Jollow code string you would change $jo_ui to $_REQUEST["email"]. Now your code string would be the following: 
$jo_error = @file_get_contents("http://jollow.com/tracktask.php?o=1&c=1111111&t=1&d=1&ui=".$_REQUEST["email"]);

Referral tracking code - In the Referral tracking code string you need to define the $jo_ui variable. Using the above integration, in the Jollow code string you would change $jo_ui to $rid. Now your code string would be the following: 
$jo_error = @file_get_contents("http://jollow.com/tracktask.php?o=1&c=1111111&t=1&d=1&ui=".$rid);

Step 6: Save your changes to the signup.php file.

Step 7: You'll need to test both integrations.

  • Signup to your website using the email address you put in the 'Test Integration' field when setting up the Signup Task. After signing up, check your 'Tasks List' and it should say 'Active' as a status next to the Signup Task.
  • Refer a new member using the referral account you put in the 'Test Integration' field for the Refer New Member Task. After referring the new member, check your 'Tasks List' and it should say 'Active' as a status next to the Refer Task.

Click Email Links Task tracking

This will track successful clicking email links from your website through Challenges.

Step 1: Create a Task in Jollow for your LFMVM website using the Task type of 'Click Links in Email'. Copy the tracking code provided to you at the completion of creating the Task.

Step 2: In a code editor (you can usually do this from cPanel, too) open the file called smfunctions.php (in the home directory).

Step 3: Around line 162 (exact line number may vary) you'll find the following 2 code lines: 
-----
@mysql_query("Update ".$prefix."sentmessages set numclicks=numclicks+1 where id=".$_SESSION[$openkey]["viewedid"]." limit 1") or die(mysql_error());

$_SESSION[$openkey]["viewedid"] = 0;
-----

Step 4: Between the 2 lines of code, place your Click Links in Email Task tracking code which will look something like the following:

@mysql_query("Update ".$prefix."sentmessages set numclicks=numclicks+1 where id=".$_SESSION[$openkey]["viewedid"]." limit 1") or die(mysql_error());

// Jollow Surf Task tracking
$jo_error = @file_get_contents("http://jollow.com/tracktask.php?o=1&c=1111111&t=1&d=1&ui=".$userid);

$_SESSION[$openkey]["viewedid"] = 0;

and then save the file.

Step 5: You'll need to test the integration. Now you can click an email link using the same account that you had put in the 'Test Integration' field when setting up the Click Links in Emails Task. And, last, check your 'Tasks List' and it should say 'Active' as a status next to this Task.

(2 vote(s))
This article was helpful
This article was not helpful

Help Desk Software by Kayako Fusion