Skip to main content
All CollectionsAdd Events
How To Setup Add To Cart & Initiate Checkout Events
How To Setup Add To Cart & Initiate Checkout Events

Learn how to setup the Add To Cart and Initiate Checkout (ATC & IC) events for your Ecommerce store.

Updated over 2 weeks ago

Start Here 👋

This article walks you through how to set up tracking for the Add to Cart and Initiate Checkout events on your ecommerce store.

If the Cometly Pixel is already installed on your ecommerce store (either hard-coded in the <head> or through the Cometly WooCommerce Plugin), you don’t need to install it again through Google Tag Manager. All you need to do is set up the Add to Cart and Initiate Checkout events, which we’ll guide you through in this article.

If you do not have a Google Tag Manager web container setup yet, please follow our guide on how to get a new GTM web container setup.


Cometly Pixel Setup

Important: If the Cometly Pixel is already installed on your ecommerce store either hard-coded in the <head> or through the Cometly WooCommerce Plugin), you can skip this step. It doesn’t need to be installed through Google Tag Manager to track Add to Cart and Initiate Checkout events if it’s already present on your site.

In this step you will add your Cometly Pixel as a tag in Google Tag Manager.

In your GTM workspace, click Add a New Tag.

Name your tag 'Cometly Pixel'

Click on Tag Configuration and choose a custom HTML tag.

Paste your Cometly Pixel into the HTML box on the Tag.

Set Trigger to 'All Pages'.


Setup Add To Cart & Initiate Checkout Events In Google Tag Manager

Setup tracking for the Add To Cart and Initiate Checkout events for ecommerce store.

In the video, we reference another tag called init that has been deprecated from the platform. Please ignore any reference to that tag. You only need the Cometly Pixel tag in Google tag manager if the Cometly Pixel is not on your website currently. Ignore the init tag in the video.

Important: If the Cometly Pixel is already installed on your ecommerce store either hard-coded in the <head> or through the Cometly WooCommerce Plugin), you can skip this step. It doesn’t need to be installed through Google Tag Manager to track Add to Cart and Initiate Checkout events if it’s already present on your site.

Video Instruction Steps:

  1. Configure Built-In Variables

  2. Create All Clicks trigger

  3. Test & preview in GTM to see the available Click Text & Click Classes for each Click

  4. Add tag: Cometly - Add To Cart

  5. Add tag: Cometly - Initiate Checkout

  6. Add tag: Cometly - View Content

Events

Add To Cart

<script>
comet('add_to_cart');
</script>

Initiate Checkout

<script>
comet('initiate_checkout');
</script>

View Content

<script>
comet('view_content');
</script>

Pre-Purchase Upsell Apps: How to setup the Add To Cart trigger

Did this answer your question?