Add the addwish partner JavaScript
To get started with addwish on your Starweb webshop, you'll need to add the addwish partner JavaScript. Please follow this simple step-by-step guide to do this:
- Navigate to Utseende > Teman:
- Click the "edit" icon:
- Add a new HTML-field (HTML-fält) by dragging it the content layout area:
- Once the new HTML-field has been added, give it the name: addwish as well as paste in the following addwish partner JavaScript code:
<script type="text/javascript"> (function() { var aws = document.createElement('script'); aws.type = 'text/javascript'; if (typeof(aws.async) != "undefined") { aws.async = true; } aws.src = (window.location.protocol == 'https:' ? 'https://d1pna5l3xsntoj.cloudfront.net' : 'http://cdn.addwish.com') + '/scripts/company/awAddGift.js#YOUR_PARTNER_ID'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(aws, s); })(); </script>
Important: Once you have pasted it in, you should replaceYOUR_PARTNER_ID
with your own addwish ID. You can find this by logging into your addwish admin account.
into the HTML-code area: - Finally, remember to Save and Publish your changes:
Add the addwish conversion tracking
To track conversion and sales performance with addwish as well as improve your algorithms for on-site recommendations, you'll have to add the addwish conversion script. Please follow this easy step-by-step guide to add the addwish conversion script:
- Navigate to Utseende > Sidor:
- Choose and edit your receipt (conversion) page (by default, this page is called "Tack för din beställning"):
- Add a new HTML-field (HTML-fält) by dragging it the content layout area:
- Once the new HTML-field has been added, give it a suiting name, i.e. addwish conversion tracking, as well as paste in the following snippet of code:
<!-- start addwish conversion tracking --> <script type="text/javascript"> _awev=(window._awev||[]);_awev.push(["bind_once", "crawl_completed", function() { ADDWISH_PARTNER_NS.api.conversion.track_sale({ total: [[orderGrandTotal]], orderNumber: ('[[orderNo]]' || '[[orderPaymentReference]]'), email:'[[customerEmail]]' }); }]); </script> <!-- end addwish conversion tracking -->
into the HTML-code area: - Finally, remember to Save and Publish your changes:
Note: The conversion tracking script can not collect product data on the Starweb platform. In order for us to get product data for orders, we will need access to your API.
Share your product data with addwish
For addwish to recommend all products to your visitors, it's important for addwish to have the details on all your products. The best way to do this, is to share your Google Shopping feed with addwish. Please follow this guide, to ensure your Google Shopping feed in Starweb is set up correctly:
- Navigate to Inställningar > Prisagenter:
- In the Google Shopping section, please ensure All products ("Alla produkter") are selected in the Product ("Produkter") drop-down:
- Finally, please share your Google Shopping feed URL with addwish – for addwish to finalise the setup process. Your Google Shopping feed URL can be found as described above, and should look like this:
https://YOUR_DOMAIN/products-feed/google-shopping
Note: Please replaceYOUR_DOMAIN
with your webshop domain.
Create a blank search page for addwish dynamic search
For addwish dynamic search to work, you'll have to create a new and blank page on your webshop – for addwish to integrate the dynamic search with your webshop.
Please follow these steps to create a blank new page:
- Navigate to Utseende > Sidor:
- Choose to add a new page (via: "Lägg till ny sida"):
- Give this new page a reasonable name, e.g.: Search results:
Note: Unfortunately you can't use the name "Sökresultat" (sokresultat) for this page name – as it's a reserved page name in Starweb. - Remember to remove the page header (via: "Dölj huvudrubrik") to make sure the page is blank:
Now Save your changes. - As the next step, you'll have to navigate to Utseende > Menyer:
- Here, choose to add a new menu (via: Lägg till ny meny):
- Give this new menu a suitable name, e.g. Menu (or as here: "Meny"):
Remember to Save your changes. - Now you'll have to edit this new menu, by adding all the pages you would like in the navigation.
Here the key is to replicate the structure of the default menu called Standardmeny, as we can not hide the new blank search page from the default Standardmeny menu. So when creating this new menu, remember to leave out the newly created search page:Remember to Save your changes.
- As the final step, you have to navigatee to Utseende > Teman:
- Now choose to edit your theme:
- Here you'll have to edit the menu ("Meny"):
- When editing the menu, choose the newly create menu you've created in the above steps:
Remember to Save your changes. - Once this new blank search page and menu has been published to the webshop, please share the new blank search page URL with addwish - to finalize the setup process of dynamic search.
The new blank search page URL should look something like this:http://YOUR_WEBSHOP_DOMAIN/page/searchresults
if you called your page Searchresults.