Does anyone has any idea how to capture analytics data in Sitecore 8.1 experience profile custom tab from non-Sitecore websites?
It would be better if its without using FXM.
Does anyone has any idea how to capture analytics data in Sitecore 8.1 experience profile custom tab from non-Sitecore websites?
It would be better if its without using FXM.
In Sitecore 8.1, there is no out of the box solution aside from FXM as already described. However, whats not mentioned is that FXM doesn't always work as advertised, and prone to error. Not reliable.
The Hurdle is xDB. It's not easy to customize xDB interactions from outside Sitecore. (Sitecore 9 solved this with the introduction of xConnect).
However, it's not impossible. One way that this could be done is to create a service endpoint that registers an interaction on a contact.
Here is an example of a Controller registering an action to register an interaction through Tracker. This only works in Sitecore 8.X and may need some adjustments for 8.1.
[System.Web.Http.ActionName("event"), System.Web.Http.HttpPost]
public ActionResult TrackClientEvent(string @event, string text, string key, string data)
{
try
{
if (string.IsNullOrEmpty(@event))
{
return BadRequest("NoEvent");
}
if (!Tracker.Enabled)
{
return BadRequest("NotTracking");
}
if (!Tracker.IsActive || Tracker.Current == null)
{
return BadRequest("TrackerInactive");
}
if (Tracker.Current == null || Tracker.Current.Interaction == null)
{
return BadRequest("NoInteraction");
}
var page = Tracker.Current.Interaction.PreviousPage ?? Tracker.Current.Interaction.CurrentPage;
if (page == null) return BadRequest("NoPage");
if (string.IsNullOrEmpty(text))
{
page.Register(@event, string.Empty);
}
else
{
var eventData = new PageEventData(@event)
{
DataKey = key,
Data = data,
Text = text
};
page.Register(eventData);
}
if (Tracker.Current.Interaction.PreviousPage != null)
Tracker.Current.CurrentPage.Cancel(); // do not track the service call
}
catch (Exception exception)
{
Log.Error("ClientEventTracker: error in event triggering", exception, this);
Response.StatusCode = 500;
return Content("Error");
}
return Content("OK");
}
Then, utilize Google Tag Manager to fire off an interaction from the external site using a tag off of the Sitecore site.
If you need to identify the contact as well you'll need to know enough about the user to identify them: email address, google user id, etc.
Hope this helps!
You can use Sitecore FXM to capture traffic from non sitecore websites.
The Federated Experience Manager (FXM) is an application that allows you add Sitecore content on external non-Sitecore websites and the track visitor interactions and generate analytics information. You can use FXM to implement personalization rules, create goals and events, and implement content profiling on an external website. You can also implement rules that include non-Sitecore sites in engagement plans, as well as track traffic from the external website in Experience Analytics.
To enable FXM functionality, you must add a JavaScript tag to the relevant external websites. This tags the external website and allows the FXM application to connect the external website's components to the Sitecore Experience Platform. FXM has a dedicated Experience Editor that allows you to assign marketing attributes, implement personalization rules, and personalized content as you would on Sitecore XP.
FXM lets you:
Easily create the FXM JavaScript tag that you deploy on the external website.
Enrich and personalize every visit with Sitecore marketing attributes, such as goals, events, profiles, outcomes, and campaigns.
More informations you can find here:
Starting from Sitecore XP 8.0, this product is distributed as an integrated part of the Sitecore Experience Platform instead of a module.