Report Experience Events
With Server-side personalization, the experience is personalized on the server. You can use either the Report Impression API or the MoEngage Web SDK to report impressions.
Applicable for all platforms, including website, mobile or TV app & more.
To report an impression for your campaign, use the API endpoint given below.
The API Request to report clicks using APIs remains the same as the one to report impressions. The only change is to the value of the action field to MOE_PERSONALIZATION_MESSAGE_CLICKED.
Using MoEngage Web SDK
Refer to this article on reporting Experience shown event using the Personalize SDK.Using MoEngage App SDK
- Refer to this article on reporting Experience shown event using the Android SDK.
- Refer to this article on reporting Experience shown event using the iOS SDK.
Authorizations
The API request will be authenticated through Basic Authentication. Basic Authentication sends a Base64-encoded string containing your username and password with every API request. It encodes a 'username:password' string in Base64 and appends the encoded string with 'Basic '. This string is included in the authorization header as shown below:
{"Authorization":"Basic bmF2ZWVua3VtYXI6bW9lbmdhZ2U="}
The username and password details can be obtained from the MoEngage Dashboard.
- Navigate to Settings -> Account -> APIs.
- Click the Copy icon in the Personalize tile in the API Keys section to copy the API Key.
- Use the Workspace ID as the username and the Personalize API Key as the password to generate the authentication header.
Headers
This is the Workspace ID of your MoEngage account, and it needs to be passed along with the request. You can find your MoEngage Workspace ID in the MoEngage Dashboard API Settings. For more information, refer to Authentication.
"Workspace ID"
This authentication parameter, used for access control, must be passed along with the request. To generate the authentication header, refer to Authentication.
"Basic bmF2ZWVua3VtYXI6bW9lbmdhZ2U=="
Body
Response
Success. The event was successfully submitted.