MySizeID Analytics Pixel
Installation:
- Make sure to include the script below on every page of your site.
- RETAILER_TOKEN : the static retailer identifier, received from MySizeID. You need to replace {RETAILER_TOKEN} in the script with the one provided by MySize.
- SIZE_CHART_CODE : the MySizeID size chart code (if exists on the current page). You need to replace the SIZE_CHART_CODE with the code relevant size chart code for the specific item page.
<script src="https://analytics-js.mysz.io/pixelEx.js?retailer_token={RETAILER_TOKEN}&size_chart_code={SIZE_CHART_CODE}" type="text/javascript"></script>
MySize can provide a function that will expose the size chart code on every product page.
Please contact the MySize support team to get the function that is relevant to your code.
- Call the following function, when an order is issued in the system:
MYSIZE_ReportOrder(orderData)
An array of objects with the following structure:
{
"external_product_id": string, - Your unique product identifier
"order_token": string, - Your unique order indetifier
"product_url": string, - The product page URL
"product_title": string, - The title of the product
"product_category": string, - The category of the product
"size_chart_code": string, - The Size chart code for this product
"selected_size": string, - The size your user selected
"quantity": integer, - The quantity of the same type of product in the order
"currency": string, - The currency used for this process (ISO-4217)
"shipment_country": string, - Country of Shipment
"shipment_city": string, - City of Shipment
"current_total_discounts": float, - The total amount of discounts for this product
"current_total_price": float, - The current total price of the order
"current_subtotal_price": float, - The current subtotal price of the order
"current_total_tax": float, - The current total current tax for the order
}
example:
[
{
"external_product_id":"BS123",
"order_token":"12345678",
"product_url":"https://www.modelista.shop/collections/BS123",
"product_title":"Blue Shirt",
"product_category":"Shirt",
"size_chart_code":"SC-5F3E42EF",
"selected_size":"S",
"quantity":1,
"currency":"USD",
"shipment_country":"US",
"shipment_city":"New York",
"current_total_discounts":0.01,
"current_total_price":100.00,
"current_subtotal_price":20.00,
"current_total_tax":17.00,
"is_order_completed": false
}
]
- To report a refund in the system, you need to call MYSIZE_ReportOrder(orderData) where orderData is with the following structure:
{
"external_product_id": string , - Your unique product identifier
"order_token": string , - Your unique order indetifier
"refund_reason_description": string , - The description for the refund reason
"refund_reason_value": string , - The symbolic value of the refund reason
"refund_quantity": integer , - The refunded quantity of the specific product
}
- refund_reason_value must be one of the following:
- too_small
- too_big
- doesnt_fit
- doesnt_suit
- didnt_like_the_style
- looks_different_in_website
- didnt_like_the_fabric
- poor_quality
- damaged
- other
example:
{
[
{
"external_product_id":"BS123",
"refund_reason_description":"Too small, doesn’t fit me",
"refund_quantity":1,
"order_token":"12345678",
"refund_reason_value": "too_small"
}
]
}
Comments
0 comments
Please sign in to leave a comment.