-
Notifications
You must be signed in to change notification settings - Fork 0
Integration Guide
Steps
- Add Template Tags
- Send events
- Synchronize Products
Every page should load Personide Connect JS script.
<script type='text/javascript' async src="//connect.personide.com/lib/js/$store_id"></script>Personide Connect JS loads certain set of information from template HTML tags in following format on every page related to store.
<div class="personide_$key" style="display: none\">$value</div>front
Front or landing page
listing
Listing, shop, index or catalogue page with all listed products
item
Single product / item page
category
Category listing or catalogue page
cart
Cart or basket page
checkout
All pages related to checkout inlcuding page that shows checkout confirmation
search
Search page
tag
Page that shows listing by a tag
other
Any other page
user_email
Logged in user's email address
user_firstname
Logged in user's first name
user_lastname
Logged in user's last name
page
Current page type
product_id
Product id if on product page
category_name
Category name if on category page
tag_name
Tag names if available in context
Events can be sent to Personide
- Using Personide Connect JS API event methods
- Using Personide Connect JS
dispatchmethod - Using direct API calls to Personide Connect server
Personide Connect JS upon page loading, dispatches the page view event.
createCartEvent(type) where type is either add or remove
createPurchaseEvent(cartDetails) where cartDetails is as per purchase event's properties example following.
Accepted Values
$set $delete view add-to-cart remove-from-cart purchase
Accepted Values
user item
Set implicitly when entityType: user
Not required for $set and $delete events
Accepted Values
For view event: One of the valid page types
For $ events: user, item
Corresponding identifier for targetEntityType
Required if event.targetEntityType is set
Page Referrer URL
Set implicitly
All available utm query parameters
{
quantity: String
}{
items: [{
id: String,
variation_id: String,
categories: Array,
price: Number, // current active price for one SKU
quantity: Number,
subtotal: Number, // total amount before discounts
total: Number // total amount after discounts
}],
total_amount: Number // total amount charged for all items after discounts and taxes
}Note: Personide Connect sets meta property automatically if personide query parameter is set in url
A valid page name
A valid strategy name
The personide element / container that referred the target product
Accepted values
hotslot, emailbox
The personide placement identifier, either default or custom
event.event |
event.targetEntityType |
event.entityType |
|---|---|---|
view |
A valid page type | user |
add-to-cart, remove-from-cart
|
item |
user |
purchase |
cart |
user |
$set, $delete
|
Not required |
item, user
|
In supported platforms like WooCommerce and Magento, data can be sent as is without converting to following standard format.
As passed to event.properties
id
Unique ID within the store
title
Name or title of the product
categories
Array of categories
description
Complete description of the product
in_stock
Availability of item. Accepted Values: true, false
regular_price
regular_price if set
sale_price
Sale price if set
on_sale
Whether the item is on sale. Accepted Valyes: true, false
url
Direct permanent url to single product page
image_url
Primary image permanent url