0

Is there a way to automatically add visitors to a specific site definition to a specific engagement plan OOTB?

Is there a way this could be implemented programmatically?

2

To add a user to an engagement plan (EP) with code is very simple. You just need to new up an AutomationStateManager and enroll the user in the EP. Just supply the ID of the EP.

var a = AutomationStateManager.Create(Tracker.Current.Contact);
a.EnrollInEngagementPlan([ID of the EngagementPlan], IDs.EngagementPlans.State.BeginingState);
2
  • What namespace is AutomationStateManager in? And what version of Sitecore is this in relation to? – Dylan Young Sep 19 '17 at 15:37
  • 1
    @DylanYoung Sitecore.Analytics.Automation.Data in assembly Sitecore.Analytics.Automation. Its been around since at least 8.1 update 0. Could be older. – Chris Auer Sep 19 '17 at 17:43
0

You can do that in couple of ways:

1. Using the WFFM Module save action.

You can find more info on the official documentation link

2. Using the campaign trigger

This is a way of achieving what you need without additional modules, but a bit hacky.

  1. Create a campaign and associate it with the desired plan. documentation link

  2. Add the script to your page: <script type="text/javascript">$(function() { $.get('/?sc_camp=[campaignid]'); });</script>. Alternatively, you can add this query string element ?sc_camp=[campaignid] to the required page.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.