latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

API Tracking code not working

Home Forums Community Forum API Tracking code not working

Tagged: 

This topic contains 12 replies, has 4 voices. Last updated by  Cristián Lávaque 4 years, 9 months ago.

Topic Author Topic
Posted: Tuesday Mar 27th, 2012 at 6:05 pm #9302
Peter Kang
Username: barrel

Perhaps I’m very confused in this matter. We’ve placed the tracking codes for zferral in the appropriate areas within s2member API tracking area. However when someone purchases anything, the code is no where to be found on the page. It’s a simple javascript method within a script tag. For debug purposes we placed the tracking in all of the areas that support it, but again none of the scripts become visible within the inspector on completion of payment. Any help you could provide would be appreciated.

List Of Topic Replies

Viewing 12 replies - 1 through 12 (of 12 total)
Author Replies
Author Replies
Posted: Wednesday Mar 28th, 2012 at 5:37 pm #9382
Raam Dev
Username: Raam
Staff Member

Hi Peter,

Have you read the documentation found at Dashboard -› s2Member® -› API / Tracking -› Signup Tracking Codes?

s2Member will display your Signup Tracking Codes in one of four possible locations… 1. If possible, on the Thank-You Return Page, after returning from your Payment Gateway. 2. Otherwise, if possible, on the Registration Form, after returning from your Payment Gateway. Note. If you offer a 100% free Trial Period, Tracking Codes will be displayed in location #2 when using PayPal® Standard Button integration. 3. Otherwise, if possible, on the Login Form after Registration is completed. 4. Otherwise, in the footer of your WordPress® theme, as soon as possible ( immediately with s2Member Pro Form integration ); or after the Customer’s very first login.

Signup Tracking Codes are displayed for all types of Membership Level Access. Including Recurring Subscriptions ( with or without a Free Trial Period ), Non-Recurring Subscriptions ( with or without a Free Trial Period ), Lifetime Subscriptions, and even Fixed-Term Subscriptions. All of these are supported by s2Member’s Button/Form Generators.

Signup Tracking Codes will NOT be processed for Free Subscribers that register without going through your Payment Gateway at all. Signup Tracking Codes will NOT be processed when an “existing” User/Member pays for a new Subscription ( see: Modification Tracking Codes for that scenario ). And, Signup Tracking Codes will NOT be processed on Buy Now transactions for Independent Custom Capabilities ( see: Capability Tracking Codes for that scenario ).

Can you please confirm that your tests have involved using the payment gateway (i.e., non-free accounts) and that you’ve checked for the tracking code in all the locations mentioned above?

Posted: Thursday Mar 29th, 2012 at 10:56 am #9458
Peter Kang
Username: barrel

That is correct. We’ve read the documentation in that article as well as all others on the tracking page. We are looking for tracking on payment transactions (no free transactions). We’re using paypal payments pro for credit card and paypal payments. Once paid either by paypal or credit card, the user returns to the same page with the form where a confirmation/login message appears at the top of the form. The tracking code does not then appear on the page, nor does the tracking script appear when the user first logs in. Is it necessary to make use of a custom return url in this case or should the tracking code be appearing as expected?

Thanks for your fast reply.

Posted: Thursday Mar 29th, 2012 at 10:17 pm #9523
Raam Dev
Username: Raam
Staff Member

Hi Peter,

I will need to escalate this to the lead developer (Jason) to see if he can offer any further suggestions.

Thank you for your patience.

Posted: Thursday Mar 29th, 2012 at 10:34 pm #9532

Could you show us a screenshot of your Tracking API page with the code you added? (blur any private info, please) [hilite path]Dashboard -› s2Member® -› API / Tracking[/hilite]

What the URL to the page where you have the tracking?

Have you tried this with the default theme? I wonder if the one you’re using could be interfering with this.

Posted: Friday Mar 30th, 2012 at 2:45 pm #9594
Peter Kang
Username: barrel

Hi again, thanks for your support.

We’re using a custom theme, but it used to work. I cannot replicate why the tracking no longer shows up. Would there be any conflicts with using ssl/https?

Please see the attached settings page. Inside the sections is zferral affiliate tracking code, which resembles:

<script type="text/javascript">
// <![CDATA[
  var _zfUrl = (("https:" == document.location.protocol) ? "https://launcheffect.zferral.com/" : "http://launcheffect.zferral.com/"); document.write(unescape("%3Cscript src='" + _zfUrl + "tracker.js?v=1' type='text/javascript'%3E%3C/script%3E"));
// ]]>
</script>

<script type="text/javascript" charset="utf-8">
//  <![CDATA[
  try {
    var e = ZFERRAL.CallEvent;
    e.init(_zfUrl, {
    campaignId   : 2,            // NOTE: This is the ID of your campaign in zferral
    revenue      : 0,            // NOTE: Enter the price of your product
    customerId   : 'customerId', // NOTE: (OPTIONAL) Enter ID of customer who completed the event
    uniqueId     : 'uniqueId',   // NOTE: (OPTIONAL) Enter some unique ID for extra security
    coupon       : 'coupon'      // NOTE: (OPTIONAL) Enter affiliate coupon
  });

  e.call();
} catch (err) {}
// ]]>
</script>

Settings screenshot:

Posted: Friday Mar 30th, 2012 at 8:54 pm #9617

Thanks Peter. I didn’t notice something wrong there…

I imagine you read this:

Signup Tracking Codes will only be displayed once for each Member. Signup Tracking Codes are displayed right after a “new”, “paying” Member, signs up successfully through your Payment Gateway, regardless of whether any money has actually been transacted initially. In other words, Signup Tracking Codes are displayed anytime a “new”, “paying” Member, signs up, even if you provided them with a 100% Free Trial Period ( e.g. no money is being transacted intially ).

s2Member will display your Signup Tracking Codes in one of four possible locations… 1. If possible, on the Thank-You Return Page, after returning from your Payment Gateway. 2. Otherwise, if possible, on the Registration Form, after returning from your Payment Gateway. Note. If you offer a 100% free Trial Period, Tracking Codes will be displayed in location #2 when using PayPal® Standard Button integration. 3. Otherwise, if possible, on the Login Form after Registration is completed. 4. Otherwise, in the footer of your WordPress® theme, as soon as possible ( immediately with s2Member Pro Form integration ); or after the Customer’s very first login.

Are all the conditions met when you look for the tracking code in the page’s HTML?

Posted: Monday Apr 2nd, 2012 at 6:13 pm #9813
Peter Kang
Username: barrel

Hi Cristian,

Would you be able to clarify what you mean by conditions? I believe we are meeting all of the conditions. I’ve also checked to see if the code is appearing in all of the possible locations.

I did notice there were some differences between the two urls

Here’s the url of the page that’s working (displaying the zferral code):
https://launcheffect.barrelclient.com/premium/single/?s2member_paypal_xco=s2member_pro_paypal_checkout_return&token=EC-6Y896305GE875143U&PayerID=2KT5UZYE9MA96

Here’s the url of the page that’s not working:
https://launcheffectapp.com/premium/single?s2member_paypal_xco=s2member_pro_paypal_checkout_return&token=EC-8XP8199191859840B&PayerID=8347NP97J5LEL

Notice the omission of forward slash immediately before the query string. Not sure if this should be affecting anything, but we don’t really have much to go on. Is there any other info you can give us on why the code might not be getting inserted?

Thanks!

Posted: Monday Apr 2nd, 2012 at 8:25 pm #9825

I’ll ask Jason if there is anything else we should know about the tracking codes with pro-forms.

The docs say

3. Otherwise, if possible, on the Login Form after Registration is completed.
4. Otherwise, in the footer of your WordPress® theme, as soon as possible ( immediately with s2Member Pro Form integration ); or after the Customer’s very first login.

so even if you didn’t see the tracking code in the page with the pro-form, did you look for it in those?

Also, could you post the log entry related to the transaction with the problem? Not sure if it’ll show anything about the tracking, but would like to see if it has any errors. Please, x’ing out any private info (e.g. email, last names).

Posted: Tuesday Apr 3rd, 2012 at 11:18 am #9870
Staff Member

Thanks for the heads up on this thread.

I noticed those links you posted were on two different domains.
Can you please describe for me the reason for that?

I suspect that’s the underlying cause. s2Member’s tracking codes work in conjunction with browser cookies that identify a paid customer immediately after a purchase. Mixing multiple domain names into a single installation may cause unexpected conflicts. WordPress will set cookies for the domain the site is configured to run on. If the domain the customer actually ends up on after checkout is different, it may fail to display tracking codes.

If you can please explain why the two links you posted are using different domains, that will help. I’ll assume you’re running a Multisite Network, is that correct?

Posted: Tuesday Apr 3rd, 2012 at 5:04 pm #9958
Peter Kang
Username: barrel

The staging site and live site are configured identically. On the staging site the code appears on the form after submission. I also checked the footer, as well as the log-in page after the first log-in with no luck.

Here’s the error log (let me know if there’s something I shouldn’t be making public):

[Sun Apr 01 03:57:24 2012] [warn] RSA server certificate CommonName (CN) `launcheffectapp.com’ does NOT match server name!?
[Sun Apr 01 08:00:12 2012] [error] [client 82.240.32.161] Directory index forbidden by Options directive: /var/www/vhosts/launcheffectapp.com/httpdocs/wp-content/themes/launcheffectsite/im/
[Sun Apr 01 12:38:25 2012] [error] [client 50.57.157.221] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.DFind:)
[Mon Apr 02 03:57:08 2012] [warn] RSA server certificate CommonName (CN) `launcheffectapp.com’ does NOT match server name!?
[Mon Apr 02 07:36:14 2012] [error] [client 216.240.147.167] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.DFind:)
[Mon Apr 02 13:11:29 2012] [error] [client 50.57.157.221] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.DFind:)
[Mon Apr 02 13:32:54 2012] [error] [client 67.253.188.0] PHP Warning: include() [function.include]: Unable to allocate memory for pool. in /var/www/vhosts/launcheffectapp.com/httpdocs/support/bb-includes/functions.bb-template.php on line 45, referer: http://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CDsQFjAA&url=http%3A%2F%2Fwww.launcheffectapp.com%2Fsupport%2Ftopic.php%3Fid%3D3&ei=w-J5T_-WFaT40gH6-KXaDQ&usg=AFQjCNGink8KuwJUnDNPxOgdqSDcPoRSOQ&sig2=jO3jRwhbImxxTD5XRvB5Ww
[Mon Apr 02 13:32:54 2012] [error] [client 67.253.188.0] PHP Warning: include() [function.include]: Unable to allocate memory for pool. in /var/www/vhosts/launcheffectapp.com/httpdocs/support/bb-includes/functions.bb-template.php on line 45, referer: http://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CDsQFjAA&url=http%3A%2F%2Fwww.launcheffectapp.com%2Fsupport%2Ftopic.php%3Fid%3D3&ei=w-J5T_-WFaT40gH6-KXaDQ&usg=AFQjCNGink8KuwJUnDNPxOgdqSDcPoRSOQ&sig2=jO3jRwhbImxxTD5XRvB5Ww
[Mon Apr 02 13:32:54 2012] [error] [client 67.253.188.0] PHP Warning: include() [function.include]: Unable to allocate memory for pool. in /var/www/vhosts/launcheffectapp.com/httpdocs/support/bb-includes/functions.bb-template.php on line 45, referer: http://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CDsQFjAA&url=http%3A%2F%2Fwww.launcheffectapp.com%2Fsupport%2Ftopic.php%3Fid%3D3&ei=w-J5T_-WFaT40gH6-KXaDQ&usg=AFQjCNGink8KuwJUnDNPxOgdqSDcPoRSOQ&sig2=jO3jRwhbImxxTD5XRvB5Ww
[Mon Apr 02 13:32:54 2012] [error] [client 67.253.188.0] PHP Warning: include() [function.include]: Unable to allocate memory for pool. in /var/www/vhosts/launcheffectapp.com/httpdocs/support/bb-includes/functions.bb-template.php on line 45, referer: http://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CDsQFjAA&url=http%3A%2F%2Fwww.launcheffectapp.com%2Fsupport%2Ftopic.php%3Fid%3D3&ei=w-J5T_-WFaT40gH6-KXaDQ&usg=AFQjCNGink8KuwJUnDNPxOgdqSDcPoRSOQ&sig2=jO3jRwhbImxxTD5XRvB5Ww
[Mon Apr 02 13:32:54 2012] [error] [client 67.253.188.0] PHP Warning: include() [function.include]: Unable to allocate memory for pool. in /var/www/vhosts/launcheffectapp.com/httpdocs/support/bb-includes/functions.bb-template.php on line 45, referer: http://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CDsQFjAA&url=http%3A%2F%2Fwww.launcheffectapp.com%2Fsupport%2Ftopic.php%3Fid%3D3&ei=w-J5T_-WFaT40gH6-KXaDQ&usg=AFQjCNGink8KuwJUnDNPxOgdqSDcPoRSOQ&sig2=jO3jRwhbImxxTD5XRvB5Ww
[Mon Apr 02 18:53:53 2012] [error] [client 176.31.121.17] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.DFind:)
[Mon Apr 02 22:35:34 2012] [error] [client 88.190.30.131] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.DFind:)
[Tue Apr 03 03:57:09 2012] [warn] RSA server certificate CommonName (CN) `launcheffectapp.com’ does NOT match server name!?
[Tue Apr 03 14:00:23 2012] [error] [client 79.102.162.217] Directory index forbidden by Options directive: /var/www/vhosts/launcheffectapp.com/httpdocs/wp-content/themes/launcheffectsite/dl/

Posted: Tuesday Apr 3rd, 2012 at 5:27 pm #9972
Peter Kang
Username: barrel

Hi Jason,

The two domains are actually on two separate WordPress installations. One is a subdomain of the domain barrelclient.com that we use for staging changes to the production site, the other domain, which is located at launcheffect.com. The two are on the same server but are completely separate installations. Not sure if there’s a setting which may not have been updated, but I’ve scoured the plug-in’s settings and everything appears to be in order.

Could these problems be caused by the plug-in being originally installed on the staging environment before launching it to the production domain?

Posted: Wednesday Apr 4th, 2012 at 4:47 am #10023

Peter, I just noticed something wrong in your launcheffectapp.com site. There are some links that have www and some that don’t. Please read this: Knowledge Base » Don't mix www and without

Viewing 12 replies - 1 through 12 (of 12 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.