Caveats
When using Discount Ninja on a shop that uses different domains to cater to different languages/regions, there are a few caveats to take into consideration.
What is a different domain?
The following clarifies what is considered a different domain.
Consider a shop hosted on the domain www.discountninja.io
The columns explain when the URL has a:
Different top-level domain (TLD): this is the part of the domain at the end. Examples include: .com, .io, .co.uk, .com.br, ...
Different subdomain: this is the part of the domain that precedes the root of the domain. Examples include: www., shop., ca.
URL | Different TLD? | Different subdomain? |
No | Yes empty instead of www | |
https://ca.discountninja.io | No | Yes ca instead of www |
http://www.discountninja.io | No different protocol: http instead of https | No different protocol: http instead of https |
Yes fr instead of io | No | |
No different path | No different path | |
https://discountninja.io/?locale=fr-BE | No different query string | No different query string |
Using tokens on different top-level domains (TLD)
Promotions triggered using a shareable link or test link will not work when your customers navigate to URLs that have a different top-level domain (TLD).
For example:
Step 1: a customer navigates to https://www.exampleshop.com?token=ABCD
The app triggers the promotion with token ABCD and stores this information in the cache.
The promotion works.
Step 2: the customer follows a link to navigate to the Canadian site: http://www.exampleshop.ca
The app attempts to retrieve the token (ABCD) from the cache, but the browser denies access to the values stored when on exampleshop.com, because the customer is on a different domain: exampleshop.ca
The promotion does not work after navigating to exampleshop.ca.
Unless the customer adds the token to the URL (https://www.exampleshop.ca?token=ABCD), the promotion will not trigger.
Using tokens on different subdomains
Promotions triggered using a shareable link or test link will work when your customers navigate to URLs that have a different subdomain.
This is because a browser can read cache that was saved on a different subdomain, as long as it belongs to the same root domain (including the same top-level domain).
Sharing promotions
If you run multiple, related Shopify storefronts, you may be able to share promotions. It depends on whether the different storefronts are administered from the same .myshopify.com shop.
If the different domains are associated with the same .myshopify.com backend, then promotions can be accessed on all of those domains (note the caveat above about top-level domains).
However, if the domains are managed on separate .myshopify.com backend, the user will need to install Discount Ninja on each .myshopify.com store and will need to set up promotions for each of those stores. Discount Ninja includes export/import functionalities to facilitate this.