To enable performance metrics for your campaign and widgets on the Photoslurp analytics panel it is necessary that your store sends information about your customers orders to our servers. To this purpose, you will have to integrate our conversion tracking code as a JavaScript snippet on your store's order confirmation page by following these steps:
1. Access your Idosell control panel and head to "Moderation -> HTML and JavaScript snippets" from the top menu. You will be presented with the campaigns list:
Top menu
Campaigns list
2. Click on the "Add campaign" button on top of the campaigns list, and give the new campaign a descriptive name e.g. "Photoslurp". Set the campaign as active, then select the stores where you want the code to be executed and save your changes.
New campaign settings
3. Return to the campaigns list by clicking on the link "Back to the campaigns list" above the information message that tells the campaign has been added, and click on the link "edit the snippets" of the newly created campaign. You will be presented with the snippets list.
Snippets list
Now click on the button "New snippet" of the snippets list to set up the Photoslurp conversion tracking snippet. The screenshot below depicts the general settings:
Conversion tracking snippet - general settings
Click on the "Edit JS" button at the top of the multiline text field and paste the following JavaScript code:
Note: You must replace the "albumId" parameter with the ID of your main campaign in the Photoslurp dashboard.
const urlParams = new URLSearchParams(window.location.search);
const orderNumber = urlParams.get('order_number');
window.photoSlurpTrackingSettings = {
products: {},
orderId: orderNumber,
// Replace the albumId value below with the ID of your main campaign
// on the Photoslurp dashboard
albumId: 1234
};
var productSKU = "";
[iai:foreach_products_begin]
var productId = [iai:product_id];
productId = productId.toString();
photoSlurpTrackingSettings.products[productId] = {
count: parseInt([iai:product_count]),
price: [iai:product_price_gross_float],
currency: 'eur'
};
[iai:foreach_products_end]
(function () {
var d = document,
h = d.getElementsByTagName('head')[0],
s = d.createElement('script');
s.type = 'text/javascript';
s.async = true;
s.src = '//static.photoslurp.com/widget/v3/tracking_notify.js';
h.appendChild(s);
}());
Finally, configure the remaining parameters like in the screenshot below, and save the snippet:
The conversion tracking code is now set up and our platform will start to receive information about the orders placed by your customers on your store. Well done!