Article sections


    In order to set up a custom goal in Explore, we need to insert an Explore specific script at certain moments that will define the goals. 

    There are some conditions that should be previously met:

    1. The Explore library script must be installed on your website.
    2. The GTM library must be installed on your website.
    3. Basic JavaScript knowledge will be needed in some cases to define GTM trigger conditions

    To achieve this, we’ll use Google Tag Manager (GTM) to deploy the scripts, as GTM should be already installed on your website and one of its features is to inject custom HTML scripts into the website at specific moments that will define the name and purpose of the goal (eg. ‘add-to-cart’, ‘filter-used’, ‘specific-cta-clicked’ etc.).

    In the example script below, the ‘new-goal’ string defines the name of the goal that you’ll see in Explore after installing the tag correctly:

    <script>_mktz.push([‘_Goal’,’new-goal‘,’VALUE’]); </script>

    The ‘new-goal’ part of the script should be adapted to reflect the tracked action and should allow you to differentiate each goal, if named correctly.


    1. Navigate to Google Tag Manager, double-click your account and open your most up-to-date workspace (eg. Default workspace), afterward click on “Tags” section.

    2. Click on “New” to create a new tag:

    3.Give your tag a name that should reflect the type (HTML), platform (Explore), purpose (goal) and the goal specific action (eg. add to cart)

    4.Click on “Tag Configuration” and select “Custom HTML” as your tag type:

    5. Copy the example script below and replace ‘new-goal’ with ‘add-to-cart’ to fit our example.

    Make sure to define the goal as needed: <script>_mktz.push([‘_Goal’,’new-goal‘,’VALUE’]); </script>

    6. Select or create a trigger to your tag that should define the moment in which your tag will fire and your goal will be sent to Explore, in accordance with the goal action (eg. add to cart click):

    7. Name your trigger (trigger type – action) and select the “All elements” click as the trigger type

    8. Click on “Some Clicks” and add conditions for your trigger, in order to trigger the tag only when you intend so. For the sake of our example, a quick, non-optimized way to trigger a button click event would be to set “Click text” equals “Add to cart”, with the presumption that the text displayed on your add-to-cart button is exactly “Add to cart”:

    9. Note: If you don’t find the “Click text” or other relevant parameters such as “Click Classes”, “Click ID”, please make sure that you enable them first from the parameter drop-down menu:

    Click Save afterward.

    10. Save your tag:

    11. Preview your container to verify if the tag is triggering when expected:

    Note: You will be prompted to add your website’s URL and to generate the action that will trigger the tag. 

    12. Publish your container and wait for a couple of hours before validating that your Explore goal count will start increasing:

    Was this post helpful?