Reference
...
Tickets
Configuration
User tracking
21min
you can optionally track user behaviour and register all actions a user takes in the webshop this includes adding tickets to orders, viewing the basket, starting checkout and confirming the order user tracking in ticketmatic is not an out of the box, standalone solution the user actions in the ticketmatic webshop are only a part of the complete user behaviour on your channels (website, app, ) the main idea is that the user actions in ticketmatic can be integrated in this larger picture setting this up requires technical knowledge and you might need the help of a partner to implement this for your specific situation good candidates are your website builder your website ticketing integrator your marketing partner in order to be compliant with privacy laws like gdpr, this user tracking is completely optional as data controller you should verify whether you need to get consent from the user to track and process this information user tracking data is stored exclusively in ticketmatic, no external services are involved ticketmatic webshop pages will not contain any other trackers or scripts and ticketmatic will only use cookies that are essential for processing the order and authenticating the user how to activate tracking if you get the right consent from the user, you can activate tracking for a widget or sales flow by passing an extra querystring parameter ref this parameter is used to link the user actions in ticketmatic with the actions of this user on your other channels as value for the ref parameter, you can for example specify a userid or clientid that is used on the website this value will be stored together with the user actions, allowing you to make the link when retrieving the data ticketmatic will not process or use this value in any way and will store and return this unaltered, so you are free to use this as you want if you don't pass a ref parameter, user actions will not be tracked for that widget or salesflow session the ref parameter does not need to be included in the signature for widgets, so you can simply append it to a generated widget or ticket sales flow link for example if you have this sales flow url https //test ticketmatic com/widgets/demo tm3/flow/saleslink?event=130716474767\&l=en you can simply append a ref parameter https //test ticketmatic com/widgets/demo tm3/flow/saleslink?event=130716474767\&l=en\&ref=user1234 how to retrieve and process the user tracking data all user tracking data is stored by ticketmatic and can be retrieved using the api in order to continuously consume the stream of user tracking data, you will need to implement a long running process or periodic job by polling the eventstream endpoint you can iterate over all user tracking data and process it (for example by sending it to google analytics or other analytics tools) user tracking data is available almost instantly on the eventstream, so there is very little delay between the user action and you processing this action polling the eventstream calling the eventstream endpoint is easy for example curl u '\<accesskey> \<secretkey>' 'https //apps ticketmatic com/api/1/\<accountname>/eventstream' the call will return an object with 3 keys results nextid moreresults results contains an array of eventstream items each item is an object with a set of fixed keys, and one of the keys is the id each eventstream item is assigned a unique (and ascending) id nextid indicates the id to start on when you next call the eventstream, and moreresults is a boolean an indicates if there are more eventstream items waiting for you calling eventstream without parameters returns the oldest available eventstream items you can pass a parameter id to retrieve all items from that id on for example curl u '\<accesskey> \<secretkey>' 'https //test ticketmatic com/api/1/\<accountname>/eventstream?id=\<nextid>' so to consume the eventstream call the endpoint process the results if moreresults is true, immediately call the endpoint again with nextid as parameter and loop if moreresults is false, wait 5 60 seconds and loop ticketmatic stores eventstream items for 4 hours so you should process the items within that timeframe processing the results each eventstream result item is an object containing keys id ts type data id is the unique id for this item, and ts is the timestamp in iso 8601 format (utc) type defines what the eventstream item is, and is a value from this list webshop\ add tickets webshop\ add products webshop\ remove tickets webshop\ remove products webshop\ checkout start webshop\ checkout addcustomerinfo webshop\ checkout adddeliveryinfo webshop\ checkout addpaymentinfo webshop\ checkout initiatepayment webshop\ checkout confirm webshop\ pageview other types might be added in the future, so make sure to filter on this and process only the items relevant to you depending on the type, relevant information is returned in the data property all items wil contain the ref key with the value you passed in the querystring webshop\ add tickets when a user adds tickets to the basket the tickets key contains an array with one object for each added ticket the order key contains the state of the order after the tickets were added { "id" "1661358385340 0", "ts" "2022 09 13t11 46 25", "type" "webshop\ add tickets", "data" { "tickets" \[ { "id" "10634", "price" "20", "servicecharge" "0", "tickettypepriceid" "580", "tickettypeid" "92", "tickettypename" "tickets", "pricetypeid" "10000", "pricetypename" "normal", "eventid" "10003", "eventname" "dance performance 2" }, { "id" "10635", "price" "20", "servicecharge" "0", "tickettypepriceid" "580", "tickettypeid" "92", "tickettypename" "tickets", "pricetypeid" "10000", "pricetypename" "normal", "eventid" "10003", "eventname" "dance performance 2" } ], "order" { "id" "398", "saleschannelid" "10000", "customerid" null, "deliveryscenarioid" null, "paymentscenarioid" null, "totalamount" "40", "tickets" \[ { "id" "10634", "price" "20", "servicecharge" "0", "tickettypepriceid" "580", "tickettypeid" "92", "tickettypename" "tickets", "pricetypeid" "10000", "pricetypename" "normal", "eventid" "10003", "eventname" "dance performance 2" }, { "id" "10635", "price" "20", "servicecharge" "0", "tickettypepriceid" "580", "tickettypeid" "92", "tickettypename" "tickets", "pricetypeid" "10000", "pricetypename" "normal", "eventid" "10003", "eventname" "dance performance 2" } ], "products" \[ ] }, "ref" "user12345" } } webshop\ remove tickets when a user removes tickets from the basket the tickets key contains an array with one object for each removed ticket the order key contains the state of the order after the tickets were added remark that when a user revisits the addtickets page after previously adding tickets and changes the number of tickets he wants, this can result in a webshop\ remove tickets action for all tickets and then a webshop\ add tickets action for the new number of tickets { "id" "1661359082144 0", "ts" "2022 09 13t11 58 02", "type" "webshop\ remove tickets", "data" { "tickets" \[ { "id" "10635", "price" "20", "servicecharge" "0", "tickettypepriceid" "580", "tickettypeid" "92", "tickettypename" "tickets", "pricetypeid" "10000", "pricetypename" "normal", "eventid" "10003", "eventname" "dance performance 2" } ], "order" { "id" "398", "saleschannelid" "10000", "customerid" null, "deliveryscenarioid" null, "paymentscenarioid" null, "totalamount" "40", "tickets" \[ { "id" "10636", "price" "20", "servicecharge" "0", "tickettypepriceid" "580", "tickettypeid" "92", "tickettypename" "tickets", "pricetypeid" "10000", "pricetypename" "normal", "eventid" "10003", "eventname" "dance performance 2" }, { "id" "10637", "price" "20", "servicecharge" "0", "tickettypepriceid" "580", "tickettypeid" "92", "tickettypename" "tickets", "pricetypeid" "10000", "pricetypename" "normal", "eventid" "10003", "eventname" "dance performance 2" } ], "products" \[ ] }, "ref" "user12345" } } webshop\ add products when a user adds products to the basket the products key contains an array with one object for each added product the order key contains the state of the order after the products were added { "id" "1661359739037 0", "ts" "2022 09 13t12 08 59", "type" "webshop\ add products", "data" { "products" \[ { "id" "10001", "productid" "10000", "price" "100", "producttype" "26002", "productname" "gift voucher" }, { "id" "10002", "productid" "10000", "price" "100", "producttype" "26002", "productname" "gift voucher" } ], "order" { "id" "398", "saleschannelid" "10000", "customerid" null, "deliveryscenarioid" null, "paymentscenarioid" null, "totalamount" "240", "tickets" \[ { "id" "10636", "price" "20", "servicecharge" "0", "tickettypepriceid" "580", "tickettypeid" "92", "tickettypename" "tickets", "pricetypeid" "10000", "pricetypename" "normal", "eventid" "10003", "eventname" "dance performance 2" }, { "id" "10637", "price" "20", "servicecharge" "0", "tickettypepriceid" "580", "tickettypeid" "92", "tickettypename" "tickets", "pricetypeid" "10000", "pricetypename" "normal", "eventid" "10003", "eventname" "dance performance 2" } ], "products" \[ { "id" "10001", "productid" "10000", "price" "100", "producttype" "26002", "productname" "gift voucher" }, { "id" "10002", "productid" "10000", "price" "100", "producttype" "26002", "productname" "gift voucher" } ] }, "ref" "user12345" } } webshop\ remove products when a user removes products from the basket the products key contains an array with one object for each removed product the order key contains the state of the order after the products were removed { "id" "1661439554553 0", "ts" "2022 09 13t10 19 14", "type" "webshop\ remove products", "data" { "products" \[ { "id" "10004", "productid" "10000", "price" "100", "producttype" "26002", "productname" "gift voucher" } ], "order" { "id" "401", "saleschannelid" "10000", "customerid" null, "deliveryscenarioid" "10000", "paymentscenarioid" "10001", "totalamount" "100", "tickets" \[ ], "products" \[ { "id" "10003", "productid" "10000", "price" "100", "producttype" "26002", "productname" "gift voucher" } ] }, "ref" "user23456" } } webshop\ checkout start when a user starts the checkout process the order key contains the state of the order { "id" "1661359739319 0", "ts" "2022 09 13t12 08 59", "type" "webshop\ checkout start", "data" { "order" { "id" "398", "saleschannelid" "10000", "customerid" null, "deliveryscenarioid" null, "paymentscenarioid" null, "totalamount" "240", "tickets" \[ { "id" "10636", "price" "20", "servicecharge" "0", "tickettypepriceid" "580", "tickettypeid" "92", "tickettypename" "tickets", "pricetypeid" "10000", "pricetypename" "normal", "eventid" "10003", "eventname" "dance performance 2" }, { "id" "10637", "price" "20", "servicecharge" "0", "tickettypepriceid" "580", "tickettypeid" "92", "tickettypename" "tickets", "pricetypeid" "10000", "pricetypename" "normal", "eventid" "10003", "eventname" "dance performance 2" } ], "products" \[ { "id" "10001", "productid" "10000", "price" "100", "producttype" "26002", "productname" "gift voucher" }, { "id" "10002", "productid" "10000", "price" "100", "producttype" "26002", "productname" "gift voucher" } ] }, "ref" "user12345" } } webshop\ checkout addcustomerinfo when a user adds customer info during the checkout process the order key contains the state of the order order customerid contains the id of the customer { "id" "1661360224312 0", "ts" "2022 09 13t12 17 04", "type" "webshop\ checkout addcustomerinfo", "data" { "order" { "id" "398", "saleschannelid" "10000", "customerid" "10016", "deliveryscenarioid" "10000", "paymentscenarioid" "10001", "totalamount" "240", "tickets" \[ { "id" "10636", "price" "20", "servicecharge" "0", "tickettypepriceid" "580", "tickettypeid" "92", "tickettypename" "tickets", "pricetypeid" "10000", "pricetypename" "normal", "eventid" "10003", "eventname" "dance performance 2" }, { "id" "10637", "price" "20", "servicecharge" "0", "tickettypepriceid" "580", "tickettypeid" "92", "tickettypename" "tickets", "pricetypeid" "10000", "pricetypename" "normal", "eventid" "10003", "eventname" "dance performance 2" } ], "products" \[ { "id" "10001", "productid" "10000", "price" "100", "producttype" "26002", "productname" "gift voucher" }, { "id" "10002", "productid" "10000", "price" "100", "producttype" "26002", "productname" "gift voucher" } ] }, "ref" "user12345" } } webshop\ checkout adddeliveryinfo when a user adds delivery info during the checkout process the order key contains the state of the order order deliveryscenarioid contains the id of the selected delivery scenario { "id" "1664159739545 0", "ts" "2022 09 13t12 08 59", "type" "webshop\ checkout adddeliveryinfo", "data" { "order" { "id" "398", "saleschannelid" "10000", "customerid" null, "deliveryscenarioid" "10000", "paymentscenarioid" null, "totalamount" "240", "tickets" \[ { "id" "10636", "price" "20", "servicecharge" "0", "tickettypepriceid" "580", "tickettypeid" "92", "tickettypename" "tickets", "pricetypeid" "10000", "pricetypename" "normal", "eventid" "10003", "eventname" "dance performance 2" }, { "id" "10637", "price" "20", "servicecharge" "0", "tickettypepriceid" "580", "tickettypeid" "92", "tickettypename" "tickets", "pricetypeid" "10000", "pricetypename" "normal", "eventid" "10003", "eventname" "dance performance 2" } ], "products" \[ { "id" "10001", "productid" "10000", "price" "100", "producttype" "26002", "productname" "gift voucher" }, { "id" "10002", "productid" "10000", "price" "100", "producttype" "26002", "productname" "gift voucher" } ] }, "ref" "user12345" } } webshop\ checkout addpaymentinfo when a user adds payment info during the checkout process the order key contains the state of the order order paymentscenarioid contains the id of the selected payment scenario webshop\ checkout initiatepayment when a user start the payment process and is redirected to the psp the order key contains the state of the order { "id" "1664310309368 0", "ts" "2022 09 13t12 18 29", "type" "webshop\ checkout initiatepayment", "data" { "order" { "id" "398", "saleschannelid" "10000", "customerid" "10016", "deliveryscenarioid" "10000", "paymentscenarioid" "10001", "totalamount" "240", "tickets" \[ { "id" "10636", "price" "20", "servicecharge" "0", "tickettypepriceid" "580", "tickettypeid" "92", "tickettypename" "tickets", "pricetypeid" "10000", "pricetypename" "normal", "eventid" "10003", "eventname" "dance performance 2" }, { "id" "10637", "price" "20", "servicecharge" "0", "tickettypepriceid" "580", "tickettypeid" "92", "tickettypename" "tickets", "pricetypeid" "10000", "pricetypename" "normal", "eventid" "10003", "eventname" "dance performance 2" } ], "products" \[ { "id" "10001", "productid" "10000", "price" "100", "producttype" "26002", "productname" "gift voucher" }, { "id" "10002", "productid" "10000", "price" "100", "producttype" "26002", "productname" "gift voucher" } ] }, "ref" "user12345" } } webshop\ checkout confirm when payment is confirmed and the user returns to ticketmatic and sees the order detail page the order key contains the state of the order { "id" "1664419049115 0", "ts" "2022 09 13t10 10 49", "type" "webshop\ checkout confirm", "data" { "order" { "id" "400", "saleschannelid" "10000", "customerid" "10016", "deliveryscenarioid" "10000", "paymentscenarioid" "10001", "totalamount" "40", "tickets" \[ { "id" "10640", "price" "20", "servicecharge" "0", "tickettypepriceid" "580", "tickettypeid" "92", "tickettypename" "tickets", "pricetypeid" "10000", "pricetypename" "normal", "eventid" "10003", "eventname" "dance performance 2" }, { "id" "10641", "price" "20", "servicecharge" "0", "tickettypepriceid" "580", "tickettypeid" "92", "tickettypename" "tickets", "pricetypeid" "10000", "pricetypename" "normal", "eventid" "10003", "eventname" "dance performance 2" } ], "products" \[ ] }, "ref" "user23456" } } webshop\ pageview when a user views a page in the widget the page key returns the name of the visited page the params object returns the widget parameters for the page { "id" "1661438970777 0", "ts" "2022 09 13t10 09 30", "type" "webshop\ pageview", "data" { "page" "summary", "params" { "edit" "yes", "flow" "basketwithcheckout", "skinid" "10000", "returnurl" "https //www ticketmatic com/", "saleschannelid" "10000", "reservemoretickets" "yes", "event" "10003", "withauthentication" "no", "subscribe" "no", "detail" "ticketdetails", "panels" "voucher,customer,delivery,payment,extrainfo", "oncompletion" "orderdetail", "requiredfields" "", "product" "", "ticketcustomfields" "", "requiredticketcustomfields" "", "ticketinfo" "", "extraevents" "", "extraproducts" "", "promocode" null }, "orderid" "400", "customerid" "10016", "ref" "user23456" } }