Shopify

If you are using Shopify as your ecommerce platform for your website, you can easily place the tracking event code in Shopify by following the provided steps. This pageview event code will need to placed across your entire website in order for additional event tracking to track and record data properly.

Page View

Implementation

  1. In Shopify click on "Online Store" in the left-hand navigation.
  2. Click on "Customize Themes" at the top of the page.
  3. Now click the "Theme options" link in the top left corner of the screen and select "Edit HTML/CSS".
  4. Under "Layout", open theme.liquid to edit your site's HTML and paste the code just below the opening head tag.
  5. Now click the "Save" button in the top right corner of the page.

Purchase

Code

When placing the tracking code on your site, be sure to place the appropriate Platform Value from the Field Values table into your tracking code. If you do not wish to track certain values, such as products or orderValue, please remove the placeholders in the trackng code and leave the value as empty quotes. View the implementation screenshots below for reference.

fuelx("purchase", {
    orderId:"ORDERID",
    orderValue:"ORDERVALUE",
    products:"Products1;Products2"
});

Field Values

FieldDescriptionRequiredPlatform Value
orderId value which identifies the order and matches the records of your Ecommerce platform or database Yes {{order_number}}
orderValue number which records the revenue of the transaction No {{total_price | money_without_currency}}
products values which record the SKU of products which have been purchased by the user, multiple SKUs can be seperated by ";" No Not Provided By Platform

Implementation

  1. From your Shopify admin, click "Settings".
  2. Now click "Checkout" under the Settings Menu.
  3. In the "Order Processing" section, find the "Additional Content and Scripts" textarea and paste the purchase event code. You can directly add the order id and order value to the corresponding fields as shown in the example below.
  4. In order to dynamically transmit order value and order number back to FuelX for increased ecommerce tracking within the FuelX platform, you will need to edit the purchase event code and use two order liquid object values within the provided code, as shown in the example below.
  5. Lastly, click the "Save" in the top right hand of the page.

Lead

Code

When placing the tracking code on your site, be sure to place the appropriate Platform Value from the Field Values table into your tracking code. If you do not wish to track certain values, such as email or leadType, please remove the placeholders in the trackng code and leave the value as empty quotes. View the implementation screenshots below for reference.

fuelx("lead",{
    leadId:"LEADID",
    leadType:"LEADTYPE",
    email:"EMAIL"
});

Field Values

FieldDescriptionRequiredPlatform Value
leadId value which identifies the lead Yes {{customer.id}}
leadType text which defines the type of leads which have been submitted, for example "signup" or "leads" No Defined By Advertiser
email email of the user completing the form No {{customer.email}}

Implementation

  1. In shopify click on "Online Store" in the left-hand navigation.
  2. Click on "Customize Themes" at the top of the page.
  3. Now click the "Theme options" in the top left corner of the screen and select "Edit HTML/CSS".
  4. Under the "Templates" folder section, select the appropriate liquid file.
  5. Now place the following lead event code at the bottom of the file if you would like to track lead events as the user reaches the page. In addition, the code can be triggered to record lead events by using onclick or onsubmit events.
  6. With the following code, lead ids and emails will be dynamically generated by Shopify and placed within the code if a user has already logged in.
  7. Now click "Save" and your lead event code will placed on your website.
Have more questions? Submit a request