With the SNPT Multi-store feature, you can have multiple SNPT accounts associated with the single Instagram account. One such use case if where you have a single Instagram account, but you have multiple languages for your store - each which have their own URL. In this scenario, you can have a SNPT account for each language, where each has it's own curated feed, with product tags which link to the corresponding store.

This article assumes you are using the WPML Wordpress Multilingual Plugin, and requires the use of the Code Snippets plugin, although if you are comfortable modifying the Wordpress functions.php , then you can of course install the conversion code that way.

It also assumes that you already have your multiple SNPT accounts setup, where you may have each account with a prefix matching the language: example_de for your German URLs, example_nl for your dutch URLs and so on.

1️⃣ Install the Code Snippets Plugin

This plugin allows for the easy addition of code snippets into your Wordpress website, to remove the need to modify the functions.php of your store.

2️⃣ Remove the Account ID from the SNPT section of your backoffice

The SNPT plugin by default assumes the single SNPT account. Given that we want to manually control the conversion code here - remove your SNPT ID from the section of your Wordpress backoffice, then click to save changes.

2️⃣ Customise the SNPT Wordpress multi-language conversion code

The following code is similar to the usual SNPT conversion code for Wordpress (which the SNPT wordpress plugin automatically sets up for you), with the addition of having the SNPT account ID vary based on the current language of the store.

// add SNPT conversion code to thank you page, 
// with the SNPT account ID based on current language
add_action('woocommerce_thankyou', 'snpt_conversion_code');

function snpt_conversion_code( $order_id ) {

$order = wc_get_order($order_id);
if(!$order) { return; }
if(!defined("ICL_LANGUAGE_CODE")) { return; }

$order_number = $order-> get_order_number();
$order_currency = $order-> get_currency();
$order_total = $order-> get_total();

if(ICL_LANGUAGE_CODE == 'en') {
$account_id = 'example-123';
} elseif(ICL_LANGUAGE_CODE == 'de') {
$account_id = 'example-456';
}

$snapppt_conversion_code = <<<EOT
<!-- SNPT conversion code -->
<script>
window.snapppt_order_number = '$order_number';
window.snapppt_order_total = '$order_total';
window.snapppt_order_currency = '$order_currency';
window.snapppt_account = '$account_id';
window.snapppt_platform = 'woocommerce';
</script>
<script src="//snapppt.com/conversion-tracker.js"></script>
EOT;

echo($snapppt_conversion_code);

}

3️⃣ Add your customised conversion code as a Code Snippet

From here, head back into your Wordpress account, click into the Snippets sidebar section added by the Code Snippets plugin and paste in your customised conversion code.

As noted in the screenshot below, add each of your languages, along with the corresponding SNPT account ID for each of your SNPT stores - you'll find the Account ID in the 'Account Details' section.

From here, run a test order through your store to confirm all is working. Should you need any help from this point, you know where to find us 🙌🏻

Did this answer your question?