It’s important that addwish is correctly installed on your website before you try to set up abandoned cart notifications.
This means you have
- Supplied us with your product data by giving us the URL to your product feed or adding the addwish product span. Click here for a guide on how to do this.
- Supplied us with conversion data by adding the addwish conversion span. Click here for a guide on how to do this.
Allow us to track cart contents
First you have to allow us to track cart contents. We need this information to send out personalized abandoned cart notifications featuring an image of the product the customer has left behind.
How can I do this?
You can do this by adding a span into the HTML of your cart page. A span is a small piece of code that will allow addwish to collect data about the contents of the cart every time a user views the cart page. Spans should always be in the body of your HTML (in between
</body>).This will allow the addwish script to read the contents of the cart every time the cart page is viewed by a user.
This is how the span looks:
<span class="addwish-cart" style="display:none" data-url="http://example.com/cart/id/789"> <span class="addwish-product" data-url="http://example.com/product/456.html" data-productnumber="p-456-2"> </span> <span class="addwish-product" data-url="http://example.com/product/2234.html" data-productnumber="p-2234"> </span> </span>
The first and last span tags are called the root span. The other spans on the inside are called the inner spans (or product spans).
data-urlattribute in the first line of the span is optional. If you have a URL which will lead directly back to the abandoned cart you can include it here. This will allow you to link directly back to the abandoned cart in your notifications.
- Inside the root span are a number of product spans. There should be one of these for every product in the cart. If the cart is empty there are no product spans. Addwish can see that the cart is empty because the root span will still be there.
- In each product span the
data-urlattribute must contain the canonical url for the product. The
data-productnumbershould be the product number.
The first argument is the url to the product, the second is the product number.
2. Register e-mail addresses
Cart contents are tracked regardless of if the email address of the customer is known or if you have permission to send an abandoned cart email to the customer.
But to indicate to addwish that you have permission to send abandoned cart mails to the current customer you must register an email address for that user.
You can register the email address after you get permission from the user to send abandoned cart mails. It’s your responsibility to make sure that you only register e-mail addresses that you have permission for.
This will register the email address of the user currently visiting your shop. It does not matter whether you call the function before or after the customer views their cart.
Sending out newsletters is a great way to register a lot of e-mails for abandoned cart. When users interact with your newsletter your website code can intercept which email address the user originated from and, if the user has given permission, you can use this information to register them for addwish abandoned cart e-mails.
If you need to remove the permission for a specific user, it is very important that you remember to de-register the user for abandoned cart mails by calling:
3. Layout and design
You have full control of the design of the email that is sent to your customers. We’ll help you implement the email template once you have completed the overall design.
Before the first abandoned cart mail is sent, you will have the opportunity to test the look and feel of the email by receiving all the mails that will be sent to users. This lets you see what the users will receive.
If you get stuck at any point, just give one of our team a call we’ll be happy to guide you through the process.
Denmark: +45 89 88 92 00
Sweden: +46 (0) 40 668 82 60
UK: +44 (0) 2036 959 585