# Tracking

## Track a Page Load or App Open

> Tracks a user session start, either from a web page load or a mobile app open.\
> This endpoint returns a \`clickId\` which should be captured and can be used later to attribute a conversion.

```json
{"openapi":"3.1.0","info":{"title":"Brand API - Page Load Tracking","version":"v12"},"servers":[{"url":"https://trkapi.impact.com","description":"Tracking API Server"}],"paths":{"/PageLoad":{"post":{"summary":"Track a Page Load or App Open","description":"Tracks a user session start, either from a web page load or a mobile app open.\nThis endpoint returns a `clickId` which should be captured and can be used later to attribute a conversion.","operationId":"trackPageLoad","tags":["Tracking"],"requestBody":{"description":"Details about the page load or app open event.","required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["CampaignId","EventDate","PageUrl"],"properties":{"CampaignId":{"type":"integer","description":"Unique identifier for your program (campaign)."},"PageUrl":{"type":"string","format":"uri","description":"**Required.** Destination URL that is intercepted by the app.\n\n- If the app open occurs from an impact.com tracking link, send the full tracking link (e.g., `https://mysite.pxf.io/c/1234567/12345/1234?sharedid=abcd`).\n- If the app is opened directly (e.g., not redirected from a URL), do not send any value.\n- If the app open occurs from a non-Impact URL, send the actual URL with `https:` (e.g., `https://www.example.com?name=value`).\n- If the app open occurs using a custom URI scheme, send the full URI (e.g., `app://view?sharedid=abcd`).\n\n**Tip:** When testing clicks and events, append `?impacttest=1` to your `PageUrl`."},"PropertyId":{"type":"integer","description":"**Required for mobile/app opens.** For mobile app opens, this value is the \"System App ID\" of your app in impact.com. Found in Settings → Mobile Apps."},"AppleIfa":{"type":"string","description":"**Required for iOS app opens.** Apple ID for Advertising (IDFA) associated with the mobile device the customer converted on. Used for attribution purposes. Typically only available for iOS in-app conversions."},"GoogAId":{"type":"string","description":"**Required for Android app opens.** Google Advertising ID associated with the mobile device the customer converted on. Used for attribution purposes. Typically only available for Android in-app conversions."},"EventDate":{"type":"string","format":"date-time","description":"The timestamp of the event in ISO 8601 format."},"ReferringUrl":{"type":"string","format":"uri","description":"The URL of the website that originated the click."},"CustomProfileId":{"type":"string","description":"Your unique identifier for an anonymous website visitor."},"CustomerId":{"type":"string","description":"Your non-PII unique identifier for the customer."},"CustomerEmail":{"type":"string","description":"Customer's email address (plain text or SHA1 hashed)."},"TrackingConsent":{"type":"boolean","description":"Indicates if the user has provided consent to be tracked."},"UserAgent":{"type":"string","description":"The user agent string of the browser or device."},"AppleIfv":{"type":"string","description":"Apple ID for Vendors (IDFV), for iOS apps."},"IpAddress":{"type":"string","description":"Public IP address of the user."},"AppName":{"type":"string","description":"Name of the mobile app."},"AppPackage":{"type":"string","description":"Package name/bundle ID of the mobile app."},"AppVer":{"type":"string","description":"Version of the mobile app."},"DeviceMfr":{"type":"string","description":"Manufacturer of the mobile device (e.g., \"Apple\")."},"DeviceModel":{"type":"string","description":"Model of the mobile device (e.g., \"iPhone13,2\")."}}}}}},"responses":{"200":{"description":"Successfully tracked the event. The response will contain a clickId and either a landingPage or sessionStart. It may also include warnings.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/PageLoadResponseGateway"},{"$ref":"#/components/schemas/PageLoadResponseDirect"}]}}}},"400":{"description":"Bad Request. The request was invalid due to missing or malformed parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"schemas":{"PageLoadResponseGateway":{"type":"object","properties":{"landingPage":{"type":"string","format":"uri","description":"The destination landing page URL. Present when PageUrl is an impact.com gateway tracking link."},"clickId":{"type":"string","description":"The unique click ID generated by impact.com for this event."},"warnings":{"type":"array","description":"Non-fatal warnings about the request.","items":{"$ref":"#/components/schemas/ResponseMessage"}}}},"ResponseMessage":{"type":"object","properties":{"field":{"type":"string","description":"The request parameter that caused the message."},"level":{"type":"string","description":"The severity level of the message.","enum":["ERROR","WARNING"]},"message":{"type":"string","description":"A detailed explanation of the issue."}}},"PageLoadResponseDirect":{"type":"object","properties":{"clickId":{"type":"string","description":"The unique click ID generated by impact.com for this event."},"sessionStart":{"type":"string","format":"date-time","description":"The timestamp when the user session started."},"warnings":{"type":"array","description":"Non-fatal warnings about the request.","items":{"$ref":"#/components/schemas/ResponseMessage"}}}},"ErrorResponse":{"type":"object","properties":{"errors":{"type":"array","description":"Errors that prevented the request from succeeding.","items":{"$ref":"#/components/schemas/ResponseMessage"}},"warnings":{"type":"array","description":"Non-fatal warnings about the request.","items":{"$ref":"#/components/schemas/ResponseMessage"}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://integrations.impact.com/brand-api-reference/brand-api-reference-v12/reference/page-load/tracking.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
