Jump to content
Sign in to follow this  
simiproject

Ad Tracker (where did they come from) Update

Recommended Posts

then i noticed that if i put the ad=test for example: www.mysite.com/catalog/index.php?ad=test after the user clicks somewhere else the ad=test does not stick to the link, could this be the problem nothing at all shows up on my ad reports?

 

I *think* the variable is set in the session or cookie because it dissappears when I click off the entry page but the click is still recorded in the back end. I can even go to ssl at a different url and the click is still recorded.

 

 

 

ok one more thing that may be the problem, inthe database i noticed that both customer_refer_id and customer_advertiser were both NULL, so i changed that.. to not null, but still no luck,

 

I wouldn't mess with the DB.

 

 

 

ad tracker (admin it will not show up.... does anyone know why???

 

Are you looking in the wrong place? Nothing will show up in the Admin: Reports: Ad Results until an order has been placed. Try looking in Admin: Customers: (the customer record for the account you created after you clicked)

Share this post


Link to post
Share on other sites

I too have tried everything and it does not record the ad info into the customer table. I would throw a party if I could get this to work. Tis a great idea.

Edited by akhunaton

Share this post


Link to post
Share on other sites

Judging by the fact that about 99% of the posts in this thread are complaints from those who could not get this working I had figured I would not be able to either. Still the capabilities of this contribution were so great I at least had to try. As per my prediction, I was unable to get it to work. I've followed the directions to a T and reverted back to a pre-mod state then tried again using all the "fixes" listed in this thread. Still no luck and it seems to be that the tep_session_register('variable') statements are not working. I can access these variables from within application.php on the entry page but not from any others. Is there some way that I must call these two variables back from the session data before they can be accessed from the create_account.php page? It seems like the data is being properly set with the tep_session_register function but is not being recalled correctly in create_account.php.

Share this post


Link to post
Share on other sites

I also just queried my db to find that the advertising and referers_url variables are not being passed to the session table, which confirms my initial belief that tep_session_register is not doing its job. I even tried setting both variables directly in application_top.php, for example:

 

$advertiser = 'test.advertiser';
tep_session_register('test.advertiser');

 

Even this did not work. This function seems to be used throughout osC so I find it hard to believe that it would be broken. It seems to me that maybe I just have something turned off in my configuration that may be required to be turned on?

Share this post


Link to post
Share on other sites
//use this #5 instead of #5 in contribution to use contrib with MS2 (works on my setup)

 

5. UPDATE /catalog/create_account.php (create_account_process.php has been depreciated)----------------------------------------

 

Change THIS (around line 250):

 

 

$sql_data_array = array('customers_firstname' => $firstname,

'customers_lastname' => $lastname,

'customers_email_address' => $email_address,

'customers_telephone' => $telephone,

'customers_fax' => $fax,

'customers_newsletter' => $newsletter,

'customers_password' => tep_encrypt_password($password));

 

To THIS:

 

$sql_data_array = array('customers_firstname' => $firstname,

'customers_lastname' => $lastname,

'customers_email_address' => $email_address,

'customers_telephone' => $telephone,

'customers_fax' => $fax,

'customers_newsletter' => $newsletter,

'customers_password' => tep_encrypt_password($password),

'customers_advertiser' => $advertiser,

'customers_referer_url' => $referer_url);

 

 

 

 

 

any questions, let me know. I also hacked a quick add on so the referring url is displayed with along with the Ad source in the customer list in the admin

 

//this code displays the referring url in customer list in admin area

 

//add to admin/includes/english/customers.php

 

define('TABLE_HEADING_REFURL', 'Ref. URL');

 

 

 

 

//alter admin/customers.php

 

//after this line

<td class="dataTableHeadingContent"><?php echo TABLE_HEADING_AD; ?></td>

 

//add this string

<td class="dataTableHeadingContent"><?php echo TABLE_HEADING_REFURL; ?></td>

 

 

//change this line

 

$customers_query_raw = "select c.customers_id, c.customers_lastname, c.customers_firstname, c.customers_email_address, a.entry_country_id, c.customers_advertiser from " . TABLE_CUSTOMERS . " c left join " . TABLE_ADDRESS_BOOK . " a on c.customers_id = a.customers_id and c.customers_default_address_id = a.address_book_id " . $search . " order by c.customers_lastname, c.customers_firstname";

 

//to this (change is adding c.customers_referer_url)

$customers_query_raw = "select c.customers_id, c.customers_lastname, c.customers_firstname, c.customers_email_address, a.entry_country_id, c.customers_advertiser, c.customers_referer_url from " . TABLE_CUSTOMERS . " c left join " . TABLE_ADDRESS_BOOK . " a on c.customers_id = a.customers_id and c.customers_default_address_id = a.address_book_id " . $search . " order by c.customers_lastname, c.customers_firstname";

 

 

 

//after this line

<td class="dataTableContent"><?php echo $customers['customers_advertiser']; ?></td>

 

//add this string

<td class="dataTableContent"><?php echo $customers['customers_referer_url']; ?></td>

 

 

ENJOY!

Thanks, now it works perfectly for MS2

Share this post


Link to post
Share on other sites
Judging by the fact that about 99% of the posts in this thread are complaints from those who could not get this working I had figured I would not be able to either.  Still the capabilities of this contribution were so great I at least had to try.  As per my prediction, I was unable to get it to work.  I've followed the directions to a T and reverted back to a pre-mod state then tried again using all the "fixes" listed in this thread.  Still no luck and it seems to be that the tep_session_register('variable') statements are not working.  I can access these variables from within application.php on the entry page but not from any others.  Is there some way that I must call these two variables back from the session data before they can be accessed from the create_account.php page?  It seems like the data is being properly set with the tep_session_register function but is not being recalled correctly in create_account.php.

 

I also just queried my db to find that the advertising and referers_url variables are not being passed to the session table, which confirms my initial belief that tep_session_register is not doing its job. I even tried setting both variables directly in application_top.php, for example:

 

 

CODE 

$advertiser = 'test.advertiser';

tep_session_register('test.advertiser');

 

 

 

Even this did not work. This function seems to be used throughout osC so I find it hard to believe that it would be broken. It seems to me that maybe I just have something turned off in my configuration that may be required to be turned on?

 

 

These are the problems I am encountering. Any help would be most appreciated.

 

Thanks.

 

O

Edited by oarie

Share this post


Link to post
Share on other sites

I have it working in MS1, it shows up fine in the customers part of the admin but I am getting $0 and no results in the reports section.

Could this be something to do with orders_total table?

Share this post


Link to post
Share on other sites

One thing i noticed is that the stats_ad_results.php counts in shipping and tax, so you still don't really no how much profit you make from each ad.

 

For instance lets say 1 item totals 37.88 but 5 was shipping and 2.88 was tax, and item sold was 30 and item cost was 28 which equals 2 profit.

 

But then u spent 15 dollars for advertising.

 

Currently theres no way to factor in how much you really made, I guess the best solution for now would be just to show total sale item, that way you can just sales - cost = profit, but then you would still have to figure out what profit came from which ad.

Share this post


Link to post
Share on other sites

I still have this contrib installed but over the last 2 months since I installed it the only two users returned when I run this myswl query:

 

select customers_firstname, customers_lastname from customers where customers_advertiser is not null;

 

are the two test users I set up when testing to see if it was working. It seems to work only if a customer signs up for an account immediately after clicking the link to the site. The "sign up for an account" link must be the first link they click, otherwise the ad= value is lost. I left it installed but for me it's only wasting CPU cycles. :(

Share this post


Link to post
Share on other sites
One thing i noticed is that the stats_ad_results.php counts in shipping and tax, so you still don't really no how much profit you make from each ad.

 

For instance lets say 1 item totals 37.88 but 5 was shipping and 2.88 was tax, and item sold was 30 and item cost was 28 which equals 2 profit.

 

But then u spent 15 dollars for advertising.

 

Currently theres no way to factor in how much you really made, I guess the best solution for now would be just to show total sale item, that way you can just sales - cost = profit, but then you would still have to figure out what profit came from which ad.

bump, anyone have an opinion on this or know a solution/fix?

Share this post


Link to post
Share on other sites
I still have this contrib installed but over the last 2 months since I installed it the only two users returned when I run this myswl query:

 

select customers_firstname, customers_lastname from customers where customers_advertiser is not null;

 

are the two test users I set up when testing to see if it was working. It seems to work only if a customer signs up for an account immediately after clicking the link to the site. The "sign up for an account" link must be the first link they click, otherwise the ad= value is lost. I left it installed but for me it's only wasting CPU cycles. :(

works for me, value still shows after clicking other links within the site before signing up.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×