Technical requirements
Check these requirements before adding a Click2Buy service to your website.
If you have a problem during the integration, contact us or your Customer Success Manager, with as much detail as possible (page URL, test environment and its login details if it is password-protected, etc.).
Content Security Policy (CSP)
If your website has a Content Security Policy, add the values below to it, in your meta tags or HTTP headers. In the tables, Click2Buy domains means:
text
https://*.clic2buy.com https://*.click2buy.comThe Standard Widget, the MultiProduct Widget and the Shop are displayed in an iframe: your policy only applies to the script that creates it. The Cart Widget and the Store Locator run directly in your page, so your policy also applies to everything they load.
Standard Widget and MultiProduct Widget
| Directive | Value | Used for |
|---|---|---|
script-src | Click2Buy domains | Our script and our statistics script |
connect-src | Click2Buy domains | Checking the products before showing the button, and statistics |
frame-src | Click2Buy domains | The widget, displayed in an iframe |
Cart Widget
| Directive | Value | Used for |
|---|---|---|
script-src | Click2Buy domains | Our script and our statistics script |
connect-src | Click2Buy domains | Product availability and statistics |
img-src | Click2Buy domains | Retailer logos and product images |
style-src | 'unsafe-inline' | Its styles, added to the page in <style> tags |
Store Locator
| Directive | Value | Used for |
|---|---|---|
script-src | Click2Buy domains | Our script and our statistics script |
connect-src | Click2Buy domains | The list of retail outlets, and statistics |
img-src | Click2Buy domains | Retailer logos |
style-src | 'unsafe-inline' | Its styles, added to the page in <style> tags |
connect-src | https://api.maptiler.com | The map |
worker-src | blob: | Displaying the map |
connect-src | https://api.geoapify.com | The address search |
connect-src | https://places.googleapis.com | The address search, when it uses Google |
Shop
| Directive | Value | Used for |
|---|---|---|
script-src | Click2Buy domains | Our script |
frame-src | Click2Buy domains | The Shop, displayed in an iframe |
GDPR
Our solution is GDPR compliant by design: you don't need to wait for the visitor's consent to load our script.
Some features, such as locating visitors by IP address, still require consent: see Cookie consent.
For more information, see our GDPR documents or contact dpo@clic2buy.com.
Script specifications
- Plain JavaScript, with no framework
- Minified
- Size: 58 KB
- Loading time: around 100 ms
- Can be loaded with
asyncordefer, so it doesn't slow down your pages
Tag managers
We don't recommend loading our script through a tag manager (such as Google Tag Manager): some ad blockers block tag manager scripts.
Key terms
| Term | Definition |
|---|---|
| EAN | European Article Number, a 13-digit product code |
| UPC | Universal Product Code, a 12-digit product code |
Widget key (WIDGET_ID) | Unique key of a product for the Standard Widget, provided by your Customer Success Manager or available in our back office |
MultiProduct Widget key (MULTIPRODUCT_WIDGET_ID) | Unique key of a MultiProduct Widget, provided by your Customer Success Manager |
Cart Widget key (CART_WIDGET_ID) | Unique key of your Cart Widget, provided by your Customer Success Manager |
Store Locator key (STORE_LOCATOR_ID) | Unique key of your Store Locator, provided by your Customer Success Manager |
Shop key (SHOP_KEY) | Unique key of your Shop, provided by your Customer Success Manager |