Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Current »

CheckoutChamp connects natively with several Ad tracking platforms, however you may find the need to run a script on your page which will grab data from the session which can then be sent out to a 3rd party from the page itself.

The order’s session data will be stored within the orderData Object.

Here is an example script which will check the orderData Object for the order’s total amount:

<script>
var orderDataTmp = JSON.parse(sessionStorage.getItem("orderData"));
if(orderDataTmp) {
  //fetch your needed values from orderDataTmp.  Investigate orderData in session storage for all values.
  //Here are 2 examples
  //orderTotal: orderDataTmp.totalAmount
  //orderId: orderDataTmp.orderId
}
</script>

The script above should be added to the top of the HTML in every page that your 3rd party tracking script has been added to.

The script provided by the 3rd party will likely contain some values that need to be replaced so that the proper value is sent out. Those values will need to be replaced with values that represent what the tracking platform is wanting to see. The value inserted should always start with “orderDataTmp.” and will finish with the name of the value found within the orderData Object.

  • If the tracking script wants you to include the orderId, you will want to replace the existing value in the script with orderDataTmp.orderId

  • If the tracking script wants you to include the orderTotal, you will want to replace the existing value in the script with orderDataTmp.totalAmount

 Expand to see the more common orderData values that might be sent to a 3rd Party:

Value

Definition

address1

Customer’s Billing Address

address2

Customer’s Billing Address 2

amountPaid

The total amount paid on the order

baseCurrencyCode

Currency Code that the order was ran in

baseCurrencySymbol

Symbol of the currency that the order was in

basePrice

Amount paid for the items on the order, before shipping and taxes

baseShipping

Amount paid on the order for shipping

campaignId

The ID of the campaign that the order went against

campaignName

The name of the campaign that the order went against

cardExpiryDate

The expiration date of the credit card

cardIsDebit

Indicates if the card used was a Debit card

cardIsPrepaid

Indicates if the card used was a Prepaid card

cardLast4

The last 4 digits of the card number

cardType

The brand the card belongs to (Visa, MasterCard, etc)

city

The customer’s billing city

companyName

The customer’s company name

country

The customer’s billing country

couponCode

Coupon(s) used on the order

currencyCode

The currency code that the order was displayed in

currencySymbol

Currency symbol that was displayed on the page

custom1

CheckoutChamp Funnel Name

custom2

CheckoutChamp Page Name

custom3

Additional tracking value

custom4

Additional tracking value

custom5

Additional tracking value

customerId

The numerical value assigned to each unique customer

dateCreated

The date the order was created

discountPrice

The amount discounted after any coupons

emailAddress

The customer’s email address

firstName

The customers first name

ibanLast4

The last 4 digits of the customers International Bank Account Number

ipAddress

The customer’s IP Address

items

The items on the order [productId: W, name: X, qty: Y, productSku: Z]

lastName

The customer’s last name

merchantTxnId

The ID assigned to the transaction by the gateway

name

The customer’s full name

orderId

The customer’s orderId

orderStatus

The status of the order

orderType

The order type (NEW_SALE)

orderValue

The value of the order, before shipping and taxes

paySource

The payment method used on the order

phoneNumber

The customer’s phone number

postalCode

The customer’s billing zip code

reviewStatus

Indicates if the order needs to be reviewed in QA

salesTax

Sales tax that was billed on the order

salesUrl

The URL where the sale took place

shipAddress1

The customer’s shipping address

shipAddress2

The customer’s shipping address 2

shipCarrier

The shipping carrier, as determined by a shipProfile

shipCity

The customer’s shipping city

shipCompanyName

The customer’s shipping Company Name

shipCountry

The customer’s shipping country

shipFirstName

The customer’s shipping first name

shipLastName

The customer’s shipping last name

shipmentInsurancePrice

The amount paid for shipping insurance

shipmentInsured

Indicates if shipping insurance was purchased

shipMethod

The method of shipping, as determined by a shipProfile

shipPostalCode

The customer’s shipping zip code

shipProfileId

The ID associated with the customers chosen shipping profile

shipState

The customer’s shipping state

shipTotal

The total amount charged for shipping

shipUpcharge

The total amount billing in shipping upcharges

sourceId

The affiliate ID that was captured on the order

sourceValue1

Affiliate tracking data

sourceValue2

Affiliate tracking data

sourceValue3

Affiliate tracking data

sourceValue4

Affiliate tracking data

sourceValue5

Affiliate tracking data

state

The customer’s billing state

subTotal

The sub total of the order

surcharge

The amount charged as a surcharge

taxExemption

Indicates if there was a tax exemption

taxRate

The rate billed for taxes

taxTotal

The total amount billed for taxes

totalAmount

The total amount billed, including shipping and taxes

totalDiscount

The total amount discounted after any coupons

 Expand for instructions on viewing the orderData Object within Inspect Element tool:

Open the Inspect Element tool and place a sale on your checkout page. Then, while still in the session, open the Application menu within the Inspect Element tool, open the Session storage for your site, and then click on orderData to reveal all the data that is available.

  • No labels