Search for answers or browse our knowledge base.
Lipscore Purchase widget Implementation Guide
If your website is built with a custom-developed platform or one of the platforms Lipscore does not have an app for, you can still implement Lipscore on your website in two ways:
- API integration (recommended)
- By implementing Purchase widget on the “Thank you” page (alternative)
Pros of Purchase widget implementation
- It takes very little time to implement
- If you are technical enough, you may be able to complete the integration on your own, without involving developers, which decreases the integration cost
Cons of Purchase widget implementation
- Limited purchase data is sent to Lipscore, unless the widget is customized by your developer (e.g., unless GTIN attribute is added to the widget, it will not be possible to show stars in Google shopping or organic search. If product category data is not added, it will not be possible to use product attributes feature per category, block specific categories from being reviewed, etc.)
- In other types of integration, we recommend that the status triggering the creation of invitations is order shipped. In the Purchase widget integration, invitations are created in the Lipscore account when order is placed. This might be an issue because:
- Many changes or cancellations can happen between the moment of order placement and shipping, but invitations will be scheduled and sent out anyways, unless manually cancelled
- It is possible to configure in the Lipscore account the delay between when an invitation is created and when it is sent, but since different products may have different order processing time, it will be necessary to go for the maximum order processing time when setting up the delays. This means that if you have, for example:
- preorders, where the maximum order processing time is 2 months
- customizable products, where the maximum order processing time is 1 week
- and regular products that are sent the next day,
the delay still needs to be set to 2 months, so that customers do not receive invitations before they have received their orders. Implementing Lipscore on your website is extremely easy and you should be able to complete the steps involved in less than an hour, given that you have the right access and data available.
That said, if the concerns above are not applicable to your webshop and you are looking for a simple way to implement Lipscore, you can still effectively collect ratings and reviews using this method.
This is what you need
- Access to the source code of your website
- A valid user account with Lipscore.com
- The API key (a 24 character unique code that identifies your site in the Lipscore network) which can be found in the Settings – General – API settings after logging in on https://members.lipscore.com/login
- Information from the customer / Onboarding manager on which widgets should be implemented on the website, and possibly the preferred placements
Steps necessary to complete the implementation
1. Add Initializer script in head tag of every page of your webshop
Every page needs to have our javascript/html initializer script inside the head-tag to be able to display Lipscore widgets. This code is the same for every page and should not be altered.
Please notice that there are two things you need to change/pay attention to in the following script:
- Language code in the link to our js-file. Notice in the sample that there is an “/en/” in the url? Available languages are en, no, se, dk, fi, fr, de, br, cz, it, es
- The API key. This can be found in the Settings – General – API keys page.

2. Add invitations-widget (purchase widget) on the “thank you”-page
This widget is invisible for the customers and could be placed on the “thank you”-page after a purchase. It transfers the provided information into the Lipscore backend, where it triggers the creation of review invitation email. If this widget is not installed, no invitations will be scheduled or sent, and no feedback will be collected.
- If you want to map several products with the same invitation you need one full code block for each item
- The properties in the Code Structure that are marked with an asterisk * are mandatory. Those marked with asterisk in brackets (*) are not technically required but strongly recommended for LS functionalities to function properly: Product attributes functionality won’t work without category data, while Google will not show ratings and reviews in Google Shoppingads without GTIN numbers. Double asterisk ** means that either phone or email is required.
Code structure
<div class=“lipscore-purchase”
* data-ls-product-name=“[ProductName]”
* data-ls-brand=“[BrandName]”
* data-ls-product-id=“[ProductID]”
* data-ls-product-url=“[URL_to_product_details_page]”
data-ls-description=“Product_description-used_for_SEO”
data-ls-image-url=“[URL_to_product_image]”
data-ls-variant-id=”[VariantID]”
data-ls-variant-name=”[VariantName]”
data-ls-price=“[Selling_price-used_for_SEO]”
data-ls-price-currency=“[Price_currency-used_for_SEO]”
data-ls-availability=“[Items_in_stock-used_for_SEO]”
(*) data-ls-category=“[Product_category-used_for_SEO]”
(*) data-ls-mpn=”[Product_MPN-used_for_SEO]”
(*) data-ls-gtin=“[Product_GTIN-used_for_SEO]”
** data-ls-email=“[Email_address_of_customer]”
** data-ls-phone=“[Mobile_phone_number_of_customer]”
* data-ls-name=“[Full_name_of_customer]”
data-ls-internal-order-id=“Order_internal_ID_in_your_webshop”
data-ls-internal-customer-id=“Customer_internal_ID_in_your_webshop”
data-ls-internal-attr-1=“Internal_attribute_from_your_webshop_1”
data-ls-internal-attr-2=“Internal_attribute_from_your_webshop_2”
data-ls-internal-attr-3=“Internal_attribute_from_your_webshop_3”
data-ls-internal-attr-4=“Internal_attribute_from_your_webshop_4”
data-ls-internal-attr-5=“Internal_attribute_from_your_webshop_5”>
</div>
Actual code sample
<div class=“lipscore-purchase”
data-ls-product-name=“HTC One M8 Gold”
data-ls-brand=“HTC”
data-ls-product-id=“6268A”
data-ls-product-url=“http://mysite.com/products/htc-m8/6268A”
data-ls-variant-id=”[6268A-128]”
data-ls-variant-name=”[HTC One M8 Gold – 128GB]”
data-ls-description=“Greatest phone of 2014”
data-ls-image-url=“http://mysite.com/assets/htc-m8_6268A.png”
data-ls-price=“899”
data-ls-price-currency=“USD”
data-ls-availability=“34”
data-ls-category=“Phones-MobilePhones-HTC”
data-ls-mpn=”D65-HJG-908″
data-ls-gtin=“3234567890126”
data-ls-email=“[email protected]”
data-ls-phone=“+4712345678”
data-ls-name=“John M Olsson”
data-ls-internal-order-id=“778203”
data-ls-internal-customer-id=“84021”
data-ls-internal-attr-1=“Attribute 1”
data-ls-internal-attr-2=“Attribute 2”
data-ls-internal-attr-3=“Attribute 3”
data-ls-internal-attr-4=“Attribute 4”
data-ls-internal-attr-5=“Attribute 5”>
</div>
3. Open the Widgets library and add all relevant rating/review widgets
It is the website owner / manager / Onboarding manager at Lipscore who specifies which widgets are supposed to be implemented. Important note:
- Implementing the Rating widget on product pages is crucial for Schema.org markup (rich snippets displaying in Google organic search) and for sending information about product ratings and reviews to the Google Shopping XML feed.
4. Test the integration following these instructions.
5. Send a confirmation email to the customer and Onboarding manager that the integration is completed.
If you have any problem whatsoever getting our software to work on your site don’t hesitate to contact us at [email protected] or reach out to the Onboarding Manager assigned to your webshop.
We will be happy to help!😊

