Hot answers tagged

14

Yes you can. In this post http://ggullentops.blogspot.be/2016/02/integrating-addthis-with-sitecore-goals.html I described how you can trigger a goal from AddThis (so actually using javascript to call a controller). A snippet from the controller code: var goalItem = ... // get goal item from Sitecore var visit = Tracker.Current; var page = Tracker.Current....


9

There are two ways to register goals from JavaScript that I am aware of: Federated Experience Manager Sitecore FXM allows you to make visits and trigger events from external websites. There's an FXM feature (that is not commonly used), allowing you to combine simultaneous site visits from the same browser into a single interaction. Visits will be combined ...


7

Rules are used for something else. You are correct to associate goal instead. Also make sure to deploy goal. 1) Associate goal with an item To associate a goal with an item, from the Sitecore Launchpad, open the Experience Editor or the Content Editor, then navigate to the relevant content item. In the Attributes group, click Goals. In the Experience ...


6

The Goal data is not automatically show in experience profile. So you would need to do some SPEAK UI editing. You can add more columns to the Goal View tab in the Experience Profile by adding new items under /sitecore/client/Applications/ExperienceProfile/Contact/PageSettings/Tabs/Activity/Activity Subtabs/Goals/GoalsPanel/Goal. So you'd add a new item that ...


6

I think the part you might be missing is that actual action of clicking a link in an EXM sent email message is that the link goes to a page that sits outside of the Sitecore item structure. That page is \sitecore\RedirectUrl.aspx. Because that's the case, there isn't an item in Sitecore that allows you to tap into that action through the Sitecore UI, ...


5

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 ...


5

You can test if a goal has been triggered with this code. It looks in KBC and the current session. public bool IfGoalAlreadyExists(ID goalId) { // this will get all the goals that have ever happened in the past for a user. Basically all history. var behaviorCache = Tracker.Current.Session.Contact.GetKeyBehaviorCache().Goals.Any(x => x.Id == ...


5

Tracker.Current relies on HTTP Session Context existing. Web API does not instantiate a Session object, thereby making Tracker completely unusable. You can only use Tracker in the context of a Web Page / Controller-View Rendering. For a walkthrough on what the Tracker is doing and a full explanation on how to troubleshoot these types of issues, you can ...


4

Since you mention rules, if you do want to introduce rules so that you only trigger goal registration if other conditions are true then you can extend the processItem pipeline defined in Sitecore.Analytics.config to programmatically process a custom rules field on the context item: // check if there are any rules set, if not proceed as normal, otherwise do ...


4

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 ...


4

You can see it 2 different ways : If it is pagebased goal then goto that item in sitecore and then click analyze panel and then click on reports and select page - goals and events By going to the analytics dashboard --> Conversions --> goals (below screenshot) and then browse the individual goal by click on that goal (blue bar in graph) (so under exp ...


4

Slow approach You could load all previous visits using this code: IEnumerable<IInteractionData> visits = Tracker.Current.Contact.LoadHistorycalData(visitsToLoad); Then you could check every page of every visit and see if the goal was triggered. This would not perform well though. Fast approach You should use the Key Behavior Cache which contains (...


4

If you just want to validate if the page event was saved, you can run a MongoDB query against Interactions collection: db.Interactions.find({"$and": [ {"Pages":{"$elemMatch": {"PageEvents": {"$elemMatch": {"Name": "Your Goal Name"}}}}}, {"SiteName": "fxm"}] })


3

Found answer after going through xConnect documentation more thoroughly. Here is the code that you can use to get all goals for contact: using (Sitecore.XConnect.Client.XConnectClient client = Sitecore.XConnect.Client.Configuration.SitecoreXConnectClientConfiguration.GetClient()) { try { var contactID = Guid....


3

After spending some time with the question asker, we determined the root issue. The root problem statement was that Personalization wasn't occuring unless the user in the above example refreshed their browser. The reason behind this is that the IdentifyAs() method was being called in a component that isn't executed until Sitecore has already determined ...


3

Assumption Once the goal has been triggered by a visitor, the visitor cannot trigger the same goal. Solution If you are triggering the goal programmatically, you can check if the user has already trigger the goal. The below snippet can be used to check if the goal has been triggered. Guid goalId = // your goal ID KeyBehaviorCache cache = Sitecore....


3

If you go to your page test definition in the content editor under /sitecore/system/Marketing Control Panel/Test Lab after the draft has been saved, you can see that there is a Conversion field that allows you to select multiple goals. However, the Winner Strategy that is provided out-of-the-box, Sitecore.ContentTesting.Analytics.WinnerStrategies....


3

When does is it written to xDB Like the other answers said, it is written when the session closes. The time it takes to be written is in the web.config, in the session config. In the xml below, it is the timeout. This number is in minutes. <sessionState mode="InProc" cookieless="false" timeout="20" sessionIDManagerType="Sitecore.SessionManagement....


3

You will require to implement a custom rule as there are no rules OOTB Sitecore that allows the comparison of total engagement value of goals. The current rules about the Sitecore goals are mainly attached to the contact. To retrieve the goals total engagement value, you can do the following: var goalDefinitionManager = ServiceLocator.ServiceProvider....


3

from your code getContact != null, if this condition is false, then you are creating new contact which is incorrect. Contact contact = new Sitecore.XConnect.Contact(new ContactIdentifier(phoneAsChannel, contactus.email, ContactIdentifierType.Known)); Sitecore has already created an anonymous contact and set it in the device cookie ...


3

There is no condition-based submit action in Sitecore Forms yet but you can achieve this by adding your custom action or using conditional logic for your forms. I have not tried this yet but I will suggest the conditional logic for this. The Sitecore Forms application lets you apply conditional actions to fields in web forms. You can apply conditions to ...


2

Goal registration heavily relies on the current session. I am not aware of a good way to properly register a goal outside of actual session, page, and request being available. To enroll a contact into a specific state in an engagement plan, you can try using this API: using Sitecore.Analytics.Automation; // ... bool success = AutomationContactManager....


2

You need to set the goals on the products. Once the user triggers the goal on the product, this is recorded into MongoDB at the user session end. Sitecore stores those data into the PageEvents which are then flushed into the Analytics Database. From the Analytics / Reporting Database, there is a table call Fact_Conversions. All goals that have been ...


2

In addition to my blog post Jarmo recommended, I released the code as a Marketplace module you can install into Sitecore to display the Custom Data of the Goal https://marketplace.sitecore.net/Modules/D/Display_Goal_Context.aspx?sc_lang=en It works for 8.1 and 8.2 however I am yet to test it on 9. The source code is also available here should you need to ...


2

You need to do two things to make the goal show up and the API not be in the tracker. As you said in your question, you need to cancel the current call. I do this with a little cotroller atribute I borrowed from Habitat. namespace Sitecore.Foundation.SitecoreExtensions.Attributes { using System.Web.Mvc; using Sitecore.Analytics; public class ...


2

There is an easy way to do this by editing the link of your call to action in sitecore. In the querystring value of the link, enter in: sc_trk=goalname (so if your goal is named "LinkAction1" , then enter sc_trk=LinkAction1) Save and publish that, and it will only trigger that goal if a user clicks that call to action button.


2

It's the total engagement value attributed to the asset that occurs after site visitors have been exposed to the asset, divided by the number of visits to (exposure to) the asset. The value is collected against all goals that have an engagement value number, not just goals that specifically assigned to an asset (directly, or via campaigns). Example: If ...


2

You can use Robo 3T tool. Next example shows how to find goal by name in Interactions collection. db.getCollection('Interactions').find({Pages : {$elemMatch: {PageEvents:{$elemMatch:{Name:'FXMDemoGoal'}}}}})


2

Key behavior cache (KBC) is read-only and is loaded when a session starts. KBC is updated when session is submitted and is not meant to store live data by design. You could try combining it with current session and check goals in both KBC and Tracker.Current.Session.


2

You can try using the rule where the visit no. compares to number. Here you can set the number of visits for which the component will be visible for the user.


Only top voted, non community-wiki answers of a minimum length are eligible