TransWikia.com

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 - https://sitecore.stackexchange.com/a/25903/4515

Refer the below link for knowing all the available Submit actions OOTB : https://doc.sitecore.com/users/90/sitecore-experience-platform/en/working-with-submit-actions.html

Answered by Paulson Maclean on December 19, 2020

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

Summary

  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)

https://github.com/kazimnami/Sitecore.Commerce.ProductEngagement

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: https://support.google.com/tagmanager/topic/7679108

  • click
  • element visible
  • scroll depth
  • timer

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

<script>
AjaxAnalyticsGTM.RegisterProductGoal("{EVENT GUID}");
</script>

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: https://doc.sitecore.net/sitecore_experience_platform/80/digital_marketing/federated_experience_manager/using_fxm/apply_a_click_action_to_a_component_in_the_fxm 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

No.

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.

Further

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!

Ask a Question

Get help from others!

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