GOAFFPRO
Search…
How-To's
GoAffPro Affiliate Portal
Getting Started for Affiliates
PointsKit: Rewards & Referrals
Powered By GitBook
Goaffpro Custom Shopify Integration
For Advanced Users Only

Integration steps

All Pages

Embed the tracking script in all pages of your store. You can find this script in the Settings -> Advanced Settings tab -> Third Party Tracking section
1
<script type="text/javascript" async defer src="https://api.goaffpro.com/loader.js?shop=goaffprotest1.myshopify.com"></script>
Copied!
You can add the script in the footer page of your site.

Thank You Page

You should create your thank you page in such a manner that the following variable is exposed in global scope before the tracking script gets loaded
1
Shopify = { checkout:{ order_id:'SHOPIFY ORDER_ID OF THE ORDER' }}
Copied!

Server-Side Integration

Make an HTTP POST call to the following endpoint after the payment is processed to record the sale in the app
1
POST https://api.goaffpro.com/order_completeContent-Type: application/json​{ "ref":"the referral cookie", "shop":"the shop identifier as found in the tracking script", "order_id":"the shopify order id"}
Copied!
Last modified 1yr ago