Is it possible to associate goal triggering on button click without code?

Sitecore Asked on December 19, 2020

In sitecore DMS is there any way to associate goal triggering on button click without code , i read some blogs which are giving info regarding how to associate item or pdf to trigger goal . So is it possible to trigger goal on button click without any coding means just configuring it within CMS?

5 Answers

Yes. It is possible if the form (which has the submit button) is created using Sitecore Forms.

One of the out-of-the-box submit actions that Sitecore offers is the Trigger Goal. We can choose this submit action and then select the goal that we want to trigger on this button click.

Check my detailed answer here with step-by-step screenshots -

Refer the below link for knowing all the available Submit actions OOTB :

Answered by Paulson Maclean on December 19, 2020

Similar to @Anton's example, you can achieve the same result with a Tag Manager solution.


  1. Add an API to receive requests
  2. Add Tag Manager
  3. Content Authors can then create events/goals and trigger them on any action available with the Tag Manager

Sitecore GTM (API)

This repo, most recently updated by Rob Earlam, provides an implementation for an API that receives requests from Google Tag Manager events. It is focused on Sitecore Commerce and Habitat, but the implementation is generic enough to be adapted to any project.

Use Case

Once in place, content authors are able to create new events in Sitecore and publish them. Next, they grab the ID of the event and switch over to GTM. From GTM, they set up event triggers that will send a request to the API layer.

There are many trigger types available:

  • click
  • element visible
  • scroll depth
  • timer

The syntax for the goal/event registration is as follows:

AjaxAnalyticsGTM.RegisterProductGoal("{EVENT GUID}");

While these steps are not out-of-the-box, with a little work up front, all actions can be configured by content authors.

Answered by jrap on December 19, 2020

Yes, it is possible. But it requires workarounds. There are 2 possible ways.

  1. Use Sitecore.SBOS.LinkManager module from GitHub. It will allow you to set goal/pageevent/campaign on external links. If you need to do it on internal link then you need to add it as external link, using URL, not item. Then you will be able to add goal/pageevent/campaing. Module was developed on Sitecore 8.2. But I don't see any restrictions, why it could not work on other versions. Also, I think that this module could be easily extended for internal links.
  2. Use ?sc_trk Sitecore get parameter. Again, it will work only with "external" links to Sitecore pages. It is present in Sitecore 6.5 documentation, so should be supported since that version.

P.S. I have checked and both workarounds work fine on Sitecore 9.3.

Answered by Anton on December 19, 2020

Honestly I was looking into this myself too. And whereas Mark says that this is not possible that is (for as far as I am aware) still true.

However, I don't agree that you should look whether or not the visitor "looks at the content of my target page" since that is not true in a large number of cases.

  • adding an item to a Basket
  • marking something as a Favorite
  • Bookmarking pages
  • Subitting a (custom?) form
  • Downloading a whitepaper

... Obviously, using Sitecore's Xconnect and SDK you could register these triggered goals after most of these actions.

However, Sitecore should be an enablement platform. Enabling your editor and marketer to perform these tasks themselves.

Looking at the below link: Sitecore actually already allows you to perform this functionality

One would expect you to be able to have this in Sitecore directly as well.

Answered by Kris Verheire on December 19, 2020


You can only associate goals to items. Described here: Associate a goal with an item

But I would add; you're likely also thinking about this wrong. The goal you have, is not "the user presses the button". The real goal is "the user sees the content of my target page" - the page targeted by your Call to Action.

So you should proceed to associate your desired goal, with the item your "Go" button is linking to.


Sitecore marketing philosophy is "value driven engagement". So you associate events and happenings on your site by value. Not by click, as clicks in and on their own, mean so very little.

Answered by Mark Cassidy on December 19, 2020

Add your own answers!

Related Questions

How to get General Link Field in RenderFieldArgs?

0  Asked on August 23, 2021 by gautam-aneja


Setting site default language in SXA

1  Asked on August 23, 2021 by mohamed-mosa


Sitecore domain and sub domain authentication

1  Asked on August 23, 2021 by suresh-r


No data recorded in Experience Analytics

3  Asked on August 23, 2021 by breno-diniz-pelosi


GraphQL query to search for pages based on template

2  Asked on August 23, 2021 by serhii-shushliapin


Sitecore SxA Composite Layout not adding custom css and js

1  Asked on August 23, 2021 by nadine-lendzian


Sitecore Item URL with Custom Domain in Azure PaaS

2  Asked on August 23, 2021 by alok-kumar


Updated field in rendering variant not working

2  Asked on August 23, 2021 by barada-behura


Creating multi site using Sitecore JSS

1  Asked on August 23, 2021 by haappyy02


Scale Out Content Management AppService

1  Asked on August 23, 2021 by pirate-briggs


Use SXA rendering variant for dynamic object

1  Asked on August 23, 2021 by user2980


Custom Item Url Builder

1  Asked on August 23, 2021 by ethan-schofer


Ask a Question

Get help from others!

© 2023 All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP