|SharpSpring’s Shopping Cart Integration allows you to automatically record web transactions from your online store and attribute those sales to SharpSpring Campaigns.
This enables you to measure your end-to-end marketing ROI for eCommerce-based businesses.
This article will provide an overview on shopping carts.
Shopping Cart Information
The shopping cart allows you to measure which campaigns are creating the most online transactions, and this provides you with a way to make better marketing decisions.
After integrating a shopping cart and running a test transaction, the Cart tab will appear in SharpSpring's top toolbar. This tab is where you can access information for all of your online transactions.
Note: Shopping Cart is not available when a Salesforce Sync is active.
The Shopping Cart page displays all of your recent transactions, as well as any historical transactions, and includes information on:
Clicking on either the total number or the product icon will display the details for that transaction.
If a lead completes a web transaction and is associated with a SharpSpring campaign, you will see their sales attributed back to that individual marketing tactic on the Campaign Insights page.
Setting Embedded Code
|In order to record your eCommerce transactions as Closed Won Opportunities in SharpSpring, you will need to be familiar with the three calls that go after (or are executed after) your embedded code.||
Note: SharpSpring offers Professional Services to assist with custom coding.
The process for tracking eCommerce through SharpSpring is dictated by these three calls. They are described below in the order in which you should insert them within your shopping cart or eCommerce software.
Creating Transaction Objects
_setTransaction method to initialize a transaction object. The transaction object stores all the related information about a single transaction, such as the transaction ID, shipping charges, and billing address. This information is all pulled from the transaction ID, which will be the same value for a given transaction and all items associated with it.
In the event that an email address is supplied as part of the
_setTransaction payload, a lookup will be performed to determine if a matching record is available for that email address. If a matching record is located, the record's data may be optionally updated by supplying an additional
If a matching record is not located for a supplied email address, a new record will be created automatically and may optionally be populated with any
lastName data that is supplied. Regardless of whether an update or creation event results from including an email address in the payload, the user's tracking cookie will automatically associate with the email address supplied, and any subsequent transactions will be associated with the appropriate contact record.
Adding Items to Transactions
_addTransactionItem method tracks information about each individual item in the user's shopping cart and associates the item with each transaction via the transactionId field. This method tracks the details about a particular item, such as SKU, price, category, and quantity.
_completeTransaction method confirms that a purchase has occurred, and all data that has been built up in the transaction object is finalized as a transaction and saved as a closed opportunity.
Example Shopping Cart Code
The following is an example of basic embedded code.
The following example code reflects what complete shopping cart code looks like. This code should go after embedded code. Shopping cart code can only be placed on tracked pages.