Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

What is the best approach to design a referral tracking app?

What is the best approach to design a referral tracking app?

JackJack1
Shopify Partner
15 0 4

I am new to shopify but my experience has been an exhausting one so far due to the documentation and wanted to ask your guidance on the below scenario.

 

I am trying to create an app that will track the referral code after checkout. To be more precise; Shopify's product page will be launched from another domain and there will be ?referral_code=ABC at the end of the shopify product page URL.

 

I have tried the following without any success:

 

  • I thought I could track the checkout via webhooks and check landing_site on the server side. However, this will not work as I will be getting all the orders as opposed to the ones that are coming from this referral ie causing customer data access violations.
  • I then tried using the webpixel api. I can parse the URL, store query string params in the localstorage. Retrieve them back after checkout_completed and send only the relevant orders to my backend server. The problem here is the webpixel API does not give you sessionToken for some reason. Therefore, I cannot verify the calls on the server side.

I cannot be the only one trying this but there does not seem to be a straightforward direction at the docs. I would be grateful if you could share your guidance as I am desperate for some clarity.

 

Thanks

Replies 0 (0)