Transaction Tracking
💳

Transaction Tracking

Sending transaction information with Joyned allows us to provide you with valuable insight into the effectiveness of Joyned and user behavior. Please note that all data is stored securely as per our strict security protocols.

The transaction tracking code should be placed in the page immediately after the shopper has completed the purchase (example: "Thank you for your purchase" or "Purchase details" pages)

Implementing the tracking requires two steps; (1) Loading our tracking library and (2) Sending the details of the transaction.

Loading the Tracking Library

Loading the script can be done by adding the following script tag to the head section of the webpage:

<script src="https://cdn.joyned.app/latest/transaction.js" crossorigin="anonymous"></script>

Sending Transaction Details

Joyned collects details of the transaction to help analyze your customers behavior. No personal identifiable information is collected in this process.

The data is sent by invoking a javascript method called window.sendJoynedTransaction (that was loaded in the previous step). The input is a javascript object with the following properties:

  • apiKey (string) - This API key is unique for your website. This is provided to you by our team when you sign up for our service. Please contact customer success if you have misplaced it.
  • region (string) - What region of our servers is your website using. This is provided to you by our team when you sign up for our service. Please contact us if you have misplaced it.
  • transactionId (string) - The unique identifier of this transaction that was created by your store.
  • price (number) - The total price of the customer's cart. Normally before taxes or VAT.
  • currencyCode (string) - The three letter ISO 4217 currency code of the currency used to make the payment.
  • productIds (array of strings) - The different product IDs that were purchased in this transaction. This field is optional.
  • userId (string) - ID of the user in your website. This field is optional.

Here is an example of what the implementation may look like:

<script>
    window.sendJoynedTransaction({
        apiKey: 'your-api-key-here',
        region: 'your-region-here',
        transactionId: {{TransactionID}}, //string, example: 'PFDR1234'
        price: {{CheckOutPrice}}, //numeric, example: '123.45'
        currencyCode: {{CurrencyCode}}, //string, example: 'EUR'
        productIds: [{{ProductID1}},{{ProductID2}}],
        userId: {{GlobalUserId}},
    });
</script>

Confirming Integration

You can start integrating the tracking code before the platform is integrated/activated on your website. Contact us so we can check that the information is being received properly.