0

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.

  • 1
    Please make sure to enter all the premises of your question from the start, not as an after thought after community members have invested the time to provide an answer. – Mark Cassidy Mar 26 at 16:51
1

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

The Hurdle is xDB. It's not easy to customize xDB interactions from outside Sitecore. (Sitecore 9 solved this with the introduction of xConnect).

A Possible Solution

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!

0

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:

  • Track every visit to an external website and personalize the content on the external website by deploying a single JavaScript tag.
  • The information from the external website is available in the Experience Analytics dashboard.
  • 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.

  • Capture all the visitor information from the external website and store it in the Sitecore Experience Database (xDB).
  • Integrate the external website with the marketing capabilities that are available in Sitecore, such as goals, events, profiles,
    campaigns, engagement automation, and so on.
  • Use the Sitecore Experience Editor to edit the pages and their specific elements on the external website that you want to apply
    Sitecore marketing attributes to.
  • Use and extend a dedicated API to meet your specific tracking and personalization requirements.

More informations you can find here:

https://doc.sitecore.com/developers/81/sitecore-experience-platform/en/federated-experience-manager---a-functional-overview.html

Starting from Sitecore XP 8.0, this product is distributed as an integrated part of the Sitecore Experience Platform instead of a module.

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.