Jump to content

Triggering Thank You page after purchase in 3rd party booking system

Recommended Posts

Site URL: https://www.highridecycle.com/pricing

Hi! My website uses a 3rd party booking system (MarianaTek), which has limited my conversion tracking to "intent". I'm in the process of creating a Thank You page (to pixel), but am having trouble with the callback function provided by my integrations team. In order to trigger a Thank You page upon "purchase completion", they gave me the following code:

 

<script>
var MT_CONFIG = {
 events: {
onCheckoutComplete({ order, userId }) {
      ---> code goes here 
}
}
};
</script>

However, when I insert a redirect to /thank-you as a code injection, I'm getting an error.

So I guess my question is two-fold:

  1. What code should I add to the above callback function in order to "redirect" to my Thank You page?
  2. Am I correct in assuming I should inject the above code into the header of my pricing page (which houses the entire checkout process)?

Thank you in advance!

Edited by allissa_b
Link to comment
On 2/22/2022 at 5:06 AM, allissa_b said:

Site URL: https://www.highridecycle.com/pricing

Hi! My website uses a 3rd party booking system (MarianaTek), which has limited my conversion tracking to "intent". I'm in the process of creating a Thank You page (to pixel), but am having trouble with the callback function provided by my integrations team. In order to trigger a Thank You page upon "purchase completion", they gave me the following code:

 

<script>
var MT_CONFIG = {
 events: {
onCheckoutComplete({ order, userId }) {
      ---> code goes here 
}
}
};
</script>

However, when I insert a redirect to /thank-you as a code injection, I'm getting an error.

So I guess my question is two-fold:

  1. What code should I add to the above callback function in order to "redirect" to my Thank You page?
  2. Am I correct in assuming I should inject the above code into the header of my pricing page (which houses the entire checkout process)?

Thank you in advance!

I've give solution via PM, kindly check if it meets your requirement

Greeting, it's BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.
Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Lightbox Studio plugin
If you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you

Link to comment

Create an account or sign in to comment

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

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.