Tilda integration
Create beautiful websites without any code with Tilda.
To integrate your Tilda account with Post Affiliate Pro you can use the official built-in plugin but first you will have to do some extra steps in your Tilda account.
Add webhook
Login to your Tilda admin panel and edit the page in question (in one of your projects). Navigate to Site settings in top right corner and then to Forms. Scroll down and find Webhook.
Now enter your plugin URL:
https://URL_TO_PostAffiliatePro/plugins/Tilda/tilda.php
Do not set it for all webforms when you are asked – skip it. After this your webhook is ready. If you want to track commissions per product you have to edit the webhook to enable option “Send data on goods in an order – as an array“.
Add custom field
Still within the same project edit the block with your shopping cart. The first thing is to enable the new webhook in the CONNECTED SERVICES list (in block’s Content). Then scroll down to Input Fields and create a new ‘hidden field’. Use ‘visitorid’ as a name, or use anything you want but remember it – you will need it in the next steps.
Add custom code
Now, after you added the custom field we also need the field to be automatically populated with the tracking cookie value. To do this you will have to add an HTML block to your page with the following code:
<script id="pap_x2s6df8d" src="https://URL_TO_PostAffiliatePro/scripts/trackjs.js" type="text/javascript"></script>
<script type="text/javascript">
try {
document.getElementsByName('visitorid')[0].setAttribute("id", "pap_dx8vc2s5");
PostAffTracker.notifySale();
} catch (err) { }
</script>
Please note there is the custom field name used in the code which needs to fit yours – by default we are using ‘visitorid’ so change it if needed.
Plugin setup
Login to your Post Affiliate Pro merchant panel and navigate to Configuration > Plugins. Find and enable Tilda plugin. Configure it to set the “hidden field” name that you’ve set in the previous step. Also set all the other fields.
That is it… Make sure you’ve published your changes and your store is now connected.
Do not forget to integrate your shop with the click tracking code – you can insert it into an HTML block which you have to add to all pages which will be used as landing pages for affiliate banners and links.