Skip to main content

Collection methods

Once you have chosen to implement Piano Analytics via our SDKs, our collection API or a TMS, thanks to our dedicated article, you can choose the collection method that suits you best.

Piano collection endpoint

The Piano collection endpoint is the "standard" collection you usually start with.

It is simple and works without any configuration on your side.

Classic Collection

To find your collection domain, you can go directly to our Collection Domains tool:

Collection domain

You can pick any of the collection domains, they are dedicated to your organization and only your sites can collect data on them.

Please note that the example here is based on a SDK implementation. The same applies to a Collection API implementation. Check the dedicated article to understand the difference.

Custom Domain Data Collection

To guarantee data collection in the best conditions, we provide the ability to send events to our servers with a CNAME from one of your subdomains.

By using a custom domain, you keep your events, and collect more while keeping our SLAs.

CDDC Collection

Please note that the example here is based on a SDK implementation. The same applies to a Collection API implementation. Check the dedicated article to understand the difference.

If you want more information related to our Custom Domain Data Collection method, don't hesitate to consult the dedicated article in our Help Center.

If you want to reach the CDDC configuration interface, please follow this link.

You can find the documentation for renewing process here.

Proxify your collection

In order to maximize your data collection, you can setup a proxy between your visitors and our collection servers. This is usually done through your CDN, but it can be achieved with any proxy configured accordingly.

CDN Collection

To set this up, please follow these requirements:

  • Headers
    • Highly recommended: forward full initial request, cleaned from headers you need to (sensitive cookies, …).
    • If not possible, following headers are required:
      • Host: Origin address and not the Client CDN address (The TLS certificate submitted by the Origin will match the Piano Analytics collection domain)
      • X-Forwarded-For: IP address of the user must be propagated
      • User-Agent, Client Hints (Sec-Ch-Ua*), Accept-Language, Referer
      • Necessary cookies for analytical collection should be transmitted: atid, atidx and idrxvr (please note that these values are subject to change)
  • No forwarding to Custom Domains (CDDC), use your pa-cd.com domain.
  • Whatever path is set on the Client CDN side (e.g. www.client.com/analy/tics), it must be returned to a non-empty top-level path on the Piano Analytics API:
    • xxx.pa-cd.com/event is correct
    • xxx.pa-cd.com/analy/tics is not correct
    • xxx.pa-cd.com/ is not correct
  • The entire querystring must be embedded in the request sent to the Origin, and the HTTP method must be the same as the initial request (GET or POST)
  • No caching mechanism configured, all requests received by the CDN/Proxy Client should be forwarded to the Piano Analytics collection domain

Most CDNs already handle the constraints described below:

  • The DNS lifetime (TTL) of the Origin must be followed (60 seconds). The IP addresses of the Origin are dynamic and therefore subject to change over time and geographic location.
  • The Origin is exposed through multiple IP addresses for a single geographic location. Load balancing should be done across all Origin's IP addresses, not just one for a given period of time.
    • For example: for a traffic of 1000 requests/s, if the DNS resolution of the Origin domain responds with 4 IPs, we must make sure to send 250 requests/s on each IP.