JS Help with /thank you page tracking ID

I have an ecommerce website, and have just signed up for affiliate marketing with shareasale.com. They require that a tracking pixel is installed on the /thank-you page, that can track a contact submission ID. I am using wufoo forms for my /contact-us page. Can you help create this trackin script for my post contact, /thank-you page? Instructions below:

"For Per-Lead programs the tracking code should be placed within the HTML body tags of the lead confirmation page that is reached after they have completed filling out a form, registration, subscription, etc.
**It is important that this lead confirmation page with the Lead tracking code cannot be accessed without completing a lead. The only way the ShareASale Tracking code should be reached and displayed is when a lead is completed. You need to program the action when a user clicks reload or refresh to ensure that the tracking code will not display again in the source code for that lead confirmation page, or from any other action.

For a Lead Program

Unaltered ShareASale tracking code.

<img src="https://shareasale.com/sale.cfm?amount=AMOUNTOFSALE&tracking=TRACKINGNUMBER&transtype=TYPEOFTRANSACTION&merchantID=XXXX" width="1" height="1">

All of the capitalized values listed in the ShareASale tracking code must be replaced by your web site/ecommerce system.

1. AMOUNTOFSALE: for a lead program this is hard coded to 0.00
2. TRACKINGNUMBER: Dynamic variable code to pull a unique lead ID number from your system.
3. TYPEOFTRANSACTION: Replace this with lead.
4. MerchantID: replaced the XXXX with your ShareASale merchantID number.

**The Shareasale.com tracking code can be used with any dynamic programming language in order to incorporate the above 2 dynamic variables from your system. Examples include, but are not limited to ASP, Cold Fusions, .PHP, HTML/DHTML, CGI/Perl, JSP, Java, JavaScript, etc.
You will need to work with your Webmaster/programmer to make sure the correct programming language/syntax is used per your website and Lead system."

Thank you very much for your consideration!

  • Alexander
    • DEV MAN’s Mascot

    Hi @chris,

    Thanks for checking on this. With a single Membership, we can support the plugin you have and some general issues, but support for any WordPress issue is something available with a full membership. If you upgrade, we'd be happy to explore this with you.

    Otherwise this might be something you need to bring up with those providing your affiliate system.

    Best regards,

  • Alexander
    • DEV MAN’s Mascot


    I was about to ask what plugin this was for, but then double checked and realized that this is for WuFoo. I'm sorry for not catching this before. To be honest, I'm not all that familiar with how this plugins payment system works.

    If we were talking MarketPress, the above modification would be pretty straightforward.

    So, I can't make any promises, but will certainly try. Support with a full WPMU DEV membership includes some custom coding, but not full on custom development.

    It might be something you need to post on WPMU Jobs: https://premium.wpmudev.org/wpmu-jobs/

    Best regards,

  • Chris
    • WPMU DEV Initiate


    I am looking to reopen this topic of trouble with my tracking pixel {leadID} for shareasale.com affiliate marketing.

    In my previous post, we were not able to pass my contact form {leadID} to the thank you page, becuase I was using an embedded contact form, not hosted on wordpress.

    In another attempt to solve this problem, I just switched to gravity forms, which is hosted on my website, and was wondering if you could help create a code/solution to pass the {leadID} from the form to the tracking pixel, which is placed on the post-lead /thankyou page

    Again, here is the shareasale.com tracking pixel inserted to the /thank you page, in which I need to have the {entry_ID} generated.

    <img src="https://shareasale.com/sale.cfm?amount=0.00&tracking={ENTRY_ID}&transtype=LEAD&merchantID=XXXXX” width="1" height="1">

    If it helps, my pixel test webpages are http://www.ecustomfinishes.com/shareasale which once the form is filled, redirects to http://www.ecustomfinishes.com/thankyoutest

    Can you please help?! Thank you for taking a 2nd look,

  • Alexander
    • DEV MAN’s Mascot

    Hi @Chris,

    I don't think you need custom code for this. Try editing your form and going to "confirmations"

    You can set this to text, and disable the auto formatting to allow HTML. Then you can use the drop down to get the entry id placeholder.

    If you need to use a page, it would be best to use the "redirect method" instead, and have the entry ID sent over through the query string.

    Then you could create a Custom Page Template in your theme to be assigned to the thank you page.

    In this custom template, you can use $_GET['entry_id'] in PHP to retrieve the value passed over in the query string.

    Best regards,

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.