We are trying to send page views by following this API guide API | Pirsch Documentation we get 200 OK response but these hits are not captured in any website. Also, how is it determined against which website the hit would be captured as we don’t have any domain ID in the payload?
The tracking endpoints always respond with status code 200, unless you pass invalid or incorrect information, such as an invalid access key. This is so that we don’t provide a method to learn how to bypass our bot filtering.
Please ensure you’ve set a proper User-Agent in your browser and that you’re not behind a proxy or VPN. In rare cases, we might detect your IP address as bot traffic, but that’s very unlikely.
Got it, I will try again with a different User-Agent but is there any way to specify on which website should this page view be captured? I don’t see any key in the payload for specifying the website.
We extract that from the client authentication. If you create an access key or oAuth client on the integration settings page, it’ll be attached to the dashboard and we know where the data belongs. A field in the request itself isn’t required.
Understood, I believe we can create access key / oAuth client on the account level and website level, it makes sense keys generated from the website would be able to do it.
Since we have multiple websites to capture page views against we would need to maintain website-level keys. Am I getting it right?
Yes. The account-level client can create website-level clients. So you can fully automate it. I would recommend using access keys, as they are a lot easier to work with and don’t require a roundtrip to fetch an oAuth access token.