View item (Pageview)

This event marks a visit to a product detail page

To the API-reference

How to implement?

<!-- This event is already included in the base tag, only implement this manually for custom scenarios-->
<!-- INSTANCE_KEY SESSION_KEY AND PROFILE_KEY are inherited from the base tag -->
<script>
  tweakwiseLayer.push({
	event: 'productView',
	data: {
		productKey: 'ITEM_ID'
	}
});
</script>
curl --request POST \
     --url 'https://navigator-analytics.tweakwise.com/api/pageview?instanceKey=INSTANCE_KEY' \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
  "ProfileKey": "PROFILE_KEY",
  "ProductKey": "ITEM_ID",
  "SessionKey": "SESSION_KEY"
}
'

Parameters

NameTypeRequiredDescription
INSTANCE_KEYURL-parameter - textyesYour Tweakwise Instance Key
PROFILE_KEYBody parameter - textyesThe ID that identifies the current visitor. Read more about the profile key here
ITEM_IDBody parameter - textyesThe Tweakwise item ID of the current product
SESSION_KEYBody parameter - textyesThe session key for the specific user. This can be your own session key or GA session, as long as it's consistent throughout the user's session.
Allowed characters: alphanumeric and hyphens

When do I submit this event?

Submit this event for every display of a product detail page.

Where do I implement this event in the code?

On every product detail page.

How to handle event-specific warnings from Tweakwise

⚠️No PageViews received in the last 4 days

Description

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

Possible solution

Check whether the Tweakwise base tag or page view tracking on the website is active on product and category pages.

⚠️SessionKey: xx% missing / ProfileKey: xx% missing / ProductKey: xx% missing

Description

More than 0.5% of the PageViews events are missing the SessionKey, ProfileKey, or ProductKey.

Possible solution

Ensure that product detail pages (PDP) always pass the item Id of the viewed item ID (as known in Tweakwise app), profile key and session key of the current visitor.

⚠️ProductKey: xx% not found

Description

More than 7% of the PageViews events contain a ProductKey that is unknown in Tweakwise.

Possible solution

Verify whether the productId on the product detail page matches the item ID in the Tweakwise app.

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

Description

More than 5% of the PageViews events do not have a matching session key in a SessionStart event.

Possible solution

Ensure SessionStart triggers on time upon initial page load and that the SessionKey is preserved across page navigations.

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