Skip to content

Domains and subdomains

Grona keeps each visitor’s id in the browser’s localStorage, and browsers keep localStorage separately for each origin. So the same person can be a different visitor to Grona on two hosts of your site. Read this page if your site answers on more than one host name or scheme, or spans several domains.

An origin is the scheme, host and port together. Each of these is a separate origin, and gives the same person a separate visitor id:

Pair Same visitor id?
https://shop.example.com and https://www.shop.example.com No
http://shop.example.com and https://shop.example.com No
https://shop.example.com and https://help.example.com No
https://shop.example.com and https://shop.example.net No

Because variation assignment comes from the visitor id, a visitor who moves between two origins can be in one variation on the first and a different one on the second. Their page views and goals on each origin are counted as two visitors.

URL matching is more forgiving than identity. Campaign URL rules treat www. and the bare domain as the same host, so one campaign matches both, but the visitor still has two ids. The scheme is not ignored: an exact, “starts with” or entire-site rule on https:// does not match an http:// page.

Send all traffic to one scheme and host, for example https://shop.example.com, with a permanent redirect from every other variant. Then each visitor has one id, sees one variation and is counted once, and your campaign URL rules need only one form of each address.

The snippet is the same for every host in a workspace, so you can add it to each subdomain or domain you run campaigns on. Each one keeps its own visitor ids.

Grona has no cross-domain or cross-subdomain stitching, and no API to set the visitor id yourself, for example for signed-in customers. A campaign that spans shop.example.com and help.example.com treats them as separate audiences.