Page impression

This event marks the display of a product collection from Tweakwise

💡

Using the Tweakwise JS implementation?

When using the Tweakwise JS implementation, this event is automatically submitted when the base script is included. You won't need any additional implementation for this event.

To the API-reference

How to implement?

<!-- INSTANCE_KEY AND SESSION_KEY are inherited from the base tag -->
<script>
tweakwiseLayer.push({
  event: 'pageImpression',
  data: {
		requestId: 'REQUESTID'
	}
});
</script>
curl --request POST \
     --url 'https://navigator-analytics.tweakwise.com/api/pageimpression?instanceKey=INSTANCEKEY' \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
  "RequestId": "REQUESTID",
  "SessionKey": "SESSIONKEY"
}
'

Parameters

NameTypeRequiredDescription
INSTANCE_KEYURL-parameter - textyesYour Tweakwise Instance Key
REQUESTIDBody parameter - textyesThe ID of the Tweakwise request for the current page. Read more about the request ID here
SESSION_KEYBody parameter - textyesThe session key for the specific user. This can be your own session key, GA session. As long as it's consistent over the user's session.
Allowed characters: alphanumeric and hyphens

When do I submit this event?

Submit this event for every set of products on the current page that is retrieved from the Tweakwise Delivery API.

When rendering multiple product collections on a single page (e.g., a category grid and recommendations), fire a separate page impression event for each collection. Each event must pass the Request ID retrieved from the Tweakwise Delivery API response header used to fetch that specific collection.

Where do I implement this event in the code?

On every page where you show a collection of products that is retrieved from the Tweakwise Delivery API:

  • Merchandising pages (category pages, landing pages, search result page)
  • Pages that contain Tweakwise recommendations
  • Pages that contain Tweakwise Guided Selling
ℹ️

Recommendations & Guided selling: For the future!

At this moment, page impressions for guided selling and recommendations are not yet being processed, so these events are not yet submitted in the client-side tags. We plan to support this feature in a future update.

However, we advise implementing this in your server-side script now. Doing so has no negative side effects and will ensure you are ready once the feature goes live.

How to handle event-specific warnings from Tweakwise

⚠️No PageImpressions received in the last 4 days

Description

No PageImpressions events have been received in the last 4 days.

Possible solution

Check whether page impression events are correctly hooked into loading category and search result pages.

⚠️SessionKey: xx% missing

Description

More than 0.5% of the PageImpressions events are missing the SessionKey.

Possible solution

Ensure the SessionKey field is populated when constructing and dispatching PageImpressions data.

⚠️Mismatched sessionkeys in this event and SessionStart (xx%)

Description

More than 5% of the PageImpressions events contain a SessionKey that does not match a registered SessionStart event.

Possible solution

Verify that the session is initialized correctly and that SessionStart is processed beforehand.

Please share your findings with your implementation partner. If they have questions about these messages, please have them contact [email protected]

FAQ

Why don't I see the events in my Live Analytics when showing recommendations or guided sellings?

At this moment, page impressions for guided selling and recommendations are not yet being processed, so these events are not yet submitted in the client-side tags. We plan to support this feature in a future update.