Pixel: Transaction Analytics Guide
The Pixel
Endpoint: https://www.findmine.com/api/v1/analytics/pixel
The pixel can be used to provide data to FINDMINE in order to analyze spending habits and style preferences. Assortments of query params are provided below, which are subject to a client's available resources. Parameter names are all flexible (we can translate them on our end if different).
Query params for the pixel actors
FINDMINE will provide:
app_id
: A unique id identifying a specific client's traffic
Client MUST provide:
fm_session_id
: A first-party cookie that is generated by our JS module that will need to be passed back to us in the parameters. This cookie will be available to your server with the name_fmSession
.
If a client is running an A/B test which would impact their FINDMINE integration, they MUST provide the following so that test results can be properly measured and verified between both parties:
experiment_name
: The name of the experiment being run. (ex. experiment_name=page_redesign)experiment_branch
: The name of the experiment branch the customer is in. (ex. experiment_branch=new, experiment_branch=old).
Client can provide (the more the better):
customer_id
: A unique id representing the customer performing the transaction - should not change for a logged in user. It can be a hash of a customer id corresponding to a logged in user. This provides the highest accuracy for analyzing user spending and determining style preferences.visitor_id
: A unique id representing the site visitor, cross-device if available (ex. id derived from customer IP address). This provides good long-term data to see a bigger picture of user spending and style preferences.session_id
: A unique id tied to an individual browsing session. This provides useful granular data on spending behavior.
Query params for the transaction data
The transaction overall
Examples of useful parameters to pass:
transaction_id
: A unique id for the transaction (ex. transaction_id=ABC123)total_price
: Final amount spent on the transaction (ex. 59.99)total_discount
: Total discount applied to the transaction (ex. 10.00)
The items in the transaction
Clients can pass any item fields that they also send in the product feed (i.e. product_id, color_id). While parameter names don't have to be the same, please make sure that the values are so we can map them correctly on our end. If multiple items, use comma-separated lists for the values.
Examples of useful parameters to pass:
product_ids
: ex. product_ids=1,2,3color_ids
: ex. color_ids=blue5,blue3,blue3product_skus
: Can be an id specifying the variant (color + size + other ids) of the products purchasedproduct_quantities
: Number of units bought per productproduct_prices
: Prices of the products after discountproduct_list_prices
: Prices of the products before discount
Example API calls
Example of one product being purchased:
https://www.findmine.com/api/v1/analytics/pixel?app_id=a1s2d3
&transaction_id=OMAW047468974&total_price=17.55&discount=8.45
&customer_id=388828042&state=AZ&visitor_id=09052708493180843610149618767541206783
&product_ids=101409&product_skus=23770290&product_quantities=1&product_prices=19.5&product_list_prices=26
&fm_session_id=8edaaf04-019e-4019-b97e-3797368a6b0d
Example of multiple products being purchased in a cart:
https://www.findmine.com/api/v1/analytics/pixel?app_id=a1s2d3
&transaction_id=YYXX20190&total_price=133.38&discount=77.58&customer_id=388828042
&visitor_id=v91919&product_ids=100240,100313,68362,68362,104081,102395
&product_skus=23659840,23665755,23534159,23535412,24031007,23862642
&product_quantities=1,1,1,1,1,1&product_prices=25.5,25.5,15.98,15.98,23.2,27.2
&product_list_prices=34,34,39.98,39.98,29,34
&fm_session_id=8edaaf04-019e-4019-b97e-3797368a6b0d
Integration of the pixel
This can be as simple as an image tag on a transaction confirmation page:
<img
height="1"
width="1"
style="display:none"
src="https://www.findmine.com/api/v1/analytics/pixel?app_id=a1s2d3&transaction_id=OMAW047468974&total_price=17.55&discount=8.45&customer_id=388828042&state=AZ&visitor_id=09052708493180843610149618767541206783&product_id=101409&product_sku=23770290&product_quantity=1&product_price=19.5&product_list_price=26&fm_session_id=8edaaf04-019e-4019-b97e-3797368a6b0d"
/>
Responses
204
: Successful submission (there will not be a response body)
400
: The request was malformed
500
: Something went wrong on our end