5

Is it possible to share an analytics goal and then filter by device when viewing the report?

We are programmatically registering a goal from the website (through webapi) and it's working fine. We now want to allow a mobile app to use the same webapi to register the same user action, hence the same goal. Will we be able to separate/filter by channel when reporting so we to distinguish them?

  • I want to say yes. I know that analytics does facet by channel/device. But I haven't tested this completely. Though I have stories in my current project backlog doing just this.. so I'll let you know once I get to them. marking this as a favorite question to remind me. – Pete Navarra Oct 20 '16 at 22:33
  • I think this is possible but be sure to buy the device detection services and enable them, which is add on and can be purchased from the sitecore app center – Mrunal Daftari Jan 3 '17 at 16:41
  • If you are satisfied with my answer, you can upvote it and accept it. Thanks – Peter Procházka Jul 10 '18 at 19:44
1

As you haven't specified version of Sitecore that you use, I will show you how to do this in Sitecore 9 and XConnect. I believe something similar can be done also for Sitecore 8 with XDB as channels are in Sitecore for quite some time now. In Sitecore 7.x these were called traffic types.

More information about channels can be found here: https://doc.sitecore.net/sitecore_experience_platform/digital_marketing/marketing_operations/channels/channels

1. Go to Marketing Control Panel and under Taxonomies > Channel create your own channel in appropriate channel group. For mobile device that should be /sitecore/system/Marketing Control Panel/Taxonomies/Channel/Online/Apps

2. Use similar code to assign channel to interaction:

public async void ExampleAsync()
    {
        using (Sitecore.XConnect.Client.XConnectClient client = Sitecore.XConnect.Client.Configuration.SitecoreXConnectClientConfiguration.GetClient())
        {
            try
            {
                var contact = new Sitecore.XConnect.Contact();

                Guid channelId = Guid.NewGuid();
                string userAgent = "Sample User Agent";
                var interaction = new Sitecore.XConnect.Interaction(contact, InteractionInitiator.Brand, channelId, userAgent);

                Guid goalID = Guid.Parse("{21EC2020-3AEA-4069-A2DD-08002B30309D}"); // ID of goal item

                var goal = new Goal(goalID, DateTime.UtcNow);

                goal.EngagementValue = 20; // Manually setting engagement value rather than going to defintion item

                interaction.Events.Add(goal);

                client.AddContact(contact);
                client.AddInteraction(interaction);

                await client.SubmitAsync();
            }
            catch (XdbExecutionException ex)
            {
                // Handle exception
            }
        }
    }

Instead of Guid channelId = Guid.NewGuid(); put there your channel item id.

Code was taken from https://doc.sitecore.net/developers/xp/xconnect/xconnect-client-api/interactions/add-events.html . Take a look there for further details.

3. You will then see the channel in Experience profile under Activity tab and Visits or Channel sections:

Experience Profile showing channels

4. You will see also different channel type in Experience Analytics (as per your question):

Experience Analytics

Your Mobile app could be one of them :)

See more information here:

|improve this answer|||||

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.