<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Media Stream Analytics by connecting the APIs of Adobe Experience Cloud in Adobe Analytics Discussions</title>
    <link>https://experienceleaguecommunities.adobe.com/t5/adobe-analytics-discussions/media-stream-analytics-by-connecting-the-apis-of-adobe/m-p/279974#M1672</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The topic was originally authored and featured at Medium by Myself. Then I realized, it would be beneficial to reach out to the community and share the knowledge. Happy learning everyone &lt;IMG src="https://experienceleaguecommunities.adobe.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H3 class="graf graf-after--h3 graf--h3"&gt;Introduction&lt;/H3&gt;&lt;P class="graf graf--p graf-after--h3"&gt;Media customers have been dependent on Video Heartbeat Library SDK for measuring Media Playback. Since the release of Media Collection API some months ago, there are efforts by customers and experts in trying to integrate it in to their Media Playback.&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;This blog outlies the steps to implement a Media Stream AnalyticsData Collection Framework using only the APIs of Experience Cloud ID (ECID) service, Adobe Analytics (Data Insertion API) and Heartbeat Server. Let’s get started with the framework !!&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;Please note that this a humble effort &lt;IMG src="https://experienceleaguecommunities.adobe.com/legacyfs/online/emoticons/happy.png" /&gt; and looking forward to experts in the Adobe Analytics World to come up with better versions and media application&lt;/P&gt;&lt;H3 class="graf graf-after--p graf--h3"&gt;&lt;/H3&gt;&lt;H3 class="graf graf-after--p graf--h3"&gt;Some Handy Documentation Links&lt;/H3&gt;&lt;P class="graf graf--p graf-after--h3"&gt;Experience Cloud ID service API : &lt;A class="markup--anchor markup--p-anchor" data-href="https://marketing.adobe.com/resources/help/en_US/mcvid/mcvid-direct-integration.html" href="https://marketing.adobe.com/resources/help/en_US/mcvid/mcvid-direct-integration.html" rel="nofollow noopener" target="_blank"&gt;https://marketing.adobe.com/resources/help/en_US/mcvid/mcvid-direct-integration.html&lt;/A&gt;&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;Adobe Analytics Data Insertion API: &lt;A class="markup--anchor markup--p-anchor" data-href="https://helpx.adobe.com/in/analytics/kb/data-insertion-api-post-method-adobe-analytics.html" href="https://helpx.adobe.com/in/analytics/kb/data-insertion-api-post-method-adobe-analytics.html" rel="nofollow noopener" target="_blank"&gt;https://helpx.adobe.com/in/analytics/kb/data-insertion-api-post-method-adobe-analytics.html&lt;/A&gt;&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;Media Collection API: &lt;A class="markup--anchor markup--p-anchor" data-href="https://marketing.adobe.com/resources/help/en_US/sc/appmeasurement/hbvideo/mc-api-overview.html" href="https://marketing.adobe.com/resources/help/en_US/sc/appmeasurement/hbvideo/mc-api-overview.html" rel="nofollow noopener" target="_blank"&gt;https://marketing.adobe.com/resources/help/en_US/sc/appmeasurement/hbvideo/mc-api-overview.html&lt;/A&gt;&lt;/P&gt;&lt;H3 class="graf graf-after--p graf--h3"&gt;&lt;/H3&gt;&lt;H3 class="graf graf-after--p graf--h3"&gt;Platform Agnsotic framework&lt;/H3&gt;&lt;P class="graf graf--p graf-after--h3"&gt;This framework is expected to be platform agnostic. Depending on the platform the appropriate API request/response handling libraries needed to be loaded. Here is a sample list of platforms and API request/response handlers:&lt;/P&gt;&lt;OL class="postList"&gt;&lt;LI&gt;Web/JS — XMLHttpRequest&lt;/LI&gt;&lt;LI&gt;Android — Retrofit or okhttp3&lt;/LI&gt;&lt;LI&gt;Unity — UnityWebRequest&lt;/LI&gt;&lt;LI&gt;and the list goes on&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;SPAN class="graf graf--p graf-after--li"&gt;Across all these platforms, it is necessary to maintain the same sequence of API calls:&lt;/SPAN&gt;&lt;/P&gt;&lt;OL class="postList"&gt;&lt;LI&gt;Identifying the visitor using ECID API&lt;/LI&gt;&lt;LI&gt;Registering the visitor with Adobe Analytics&lt;/LI&gt;&lt;LI&gt;Streaming events in to the Heartbeat API server&lt;/LI&gt;&lt;/OL&gt;&lt;H3 class="graf graf-after--li graf--h3"&gt;&lt;/H3&gt;&lt;H3 class="graf graf-after--li graf--h3"&gt;1. Identifying the visitor using ECID API&lt;/H3&gt;&lt;P class="graf graf--p graf-after--h3"&gt;The ECID API is a simple request to the Demdex server of the Adobe Experience Cloud Instance which would return an Identifier for the Visitor or the client.&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;&lt;STRONG class="markup--strong markup--p-strong"&gt;When to trigger: &lt;/STRONG&gt;at the load of a visitor session, independent of the availability of the media content, like load of a page or load of a screen in a mobile app or load of home screen in an OTT device.&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;Key components of the request would look like:&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;&lt;IMG class="progressiveMedia-image js-progressiveMedia-image jive-image" data-src="https://cdn-images-1.medium.com/max/800/1*BnA0IIR-qstThtyuFrdOaQ.png" src="https://cdn-images-1.medium.com/max/800/1*BnA0IIR-qstThtyuFrdOaQ.png" /&gt;&lt;/P&gt;&lt;H3 class="graf graf-after--figure graf--h3"&gt;2. Registering the visitor with Adobe Analytics&lt;/H3&gt;&lt;P class="graf graf--p graf-after--h3"&gt;Sending the above obtained visitor id (mid) and the Org Id to the Analytics tracking server, would suffice in registering the visitor in the Analytics servers. However for debugging purpose, it is advised to add few more custom variables in the Query String Parameter&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;&lt;STRONG class="markup--strong markup--p-strong"&gt;When to trigger:&lt;/STRONG&gt; At page or screen load complete.&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;Key components of the request would look like:&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;&lt;IMG class="progressiveMedia-image js-progressiveMedia-image jive-image" data-src="https://cdn-images-1.medium.com/max/800/1*NG3f5Hkpx28Q73evAVIllw.png" src="https://cdn-images-1.medium.com/max/800/1*NG3f5Hkpx28Q73evAVIllw.png" /&gt;&lt;/P&gt;&lt;H3 class="graf graf-after--figure graf--h3"&gt;3. Streaming events in to the Heartbeat API server&lt;/H3&gt;&lt;P class="graf graf--p graf-after--h3"&gt;As of the above two steps, we have established a visitor being identified in the Analytics server. Now we would be sending the heartbeat stream events to the heartbeat api server which would server-side forward to the analytics server. As mentioned previously, the &lt;STRONG class="markup--strong markup--p-strong"&gt;Visitor ID will be the primary connecting key between the Analytics server and the Heartbeat server&lt;/STRONG&gt;.&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;There are several stream events for the Heartbeat tracking server. This blog would cover the essential events that are required for tracking a complete media playback. Post practicing these handson, you would be equipped with enough knowledge on how to implement the rest. List of events covered:&lt;/P&gt;&lt;OL class="postList"&gt;&lt;LI&gt;sessionStart — Initiates a heartbeat/media stream session at heartbeat server&lt;/LI&gt;&lt;LI&gt;play — Sets the event for start of a media content&lt;/LI&gt;&lt;LI&gt;ping — Heartbeats&lt;/LI&gt;&lt;LI&gt;pauseStart — Sets the event for pausing the media content&lt;/LI&gt;&lt;LI&gt;sessionEnd — Sets the event for completion of a media content&lt;/LI&gt;&lt;LI&gt;sessionComplete — Compelte the heartbeat/media stream session&lt;/LI&gt;&lt;/OL&gt;&lt;P class="graf graf--p graf-after--li"&gt;&lt;/P&gt;&lt;P class="graf graf--p graf-after--li"&gt;All these events are sent to the heartbeat tracking server, which appears similar to the analytics tracking server, except the “.sc.” would be replaced by “.d2.hb-api”, which points to the heartbeat api tracking server. Example:&lt;/P&gt;&lt;OL class="postList"&gt;&lt;LI&gt;Analytics server = abc123corp.sc.omtrd.net&lt;/LI&gt;&lt;LI&gt;Heartbeat API server = abc123corp.d2.hb-api.omtrdc.net&lt;/LI&gt;&lt;/OL&gt;&lt;P class="graf graf--p graf-after--li"&gt;&lt;/P&gt;&lt;P class="graf graf--p graf-after--li"&gt;Knowledge of the Media player api would be essential for this step. For example a HTML5 player would emit the following events via its API: &lt;A class="markup--anchor markup--p-anchor" data-href="https://html.spec.whatwg.org/multipage/media.html#mediaevents" href="https://html.spec.whatwg.org/multipage/media.html#mediaevents" rel="nofollow noopener" target="_blank"&gt;https://html.spec.whatwg.org/multipage/media.html#mediaevents&lt;/A&gt;. It is necessary for the platform developer to tap into these events using the event listener of the platforms.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;Now let’s start sending the stream events to the heartbeat server&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;&lt;STRONG class="markup--strong markup--p-strong"&gt;When to set sessionStart:&lt;/STRONG&gt; Begin of a media playback engagement&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;Key Components for the sessionStart API request:&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;&lt;IMG class="progressiveMedia-image js-progressiveMedia-image jive-image" data-src="https://cdn-images-1.medium.com/max/800/1*O-JtDJE2rzbsoAnDCNh9kg.png" src="https://cdn-images-1.medium.com/max/800/1*O-JtDJE2rzbsoAnDCNh9kg.png" /&gt;&lt;/P&gt;&lt;P class="graf graf--p graf-after--figure"&gt;For the subsequent events, it is suggested to develop an OOPS function which would scale across all the media events and send the API request. The subsequent api request have a similar api request json format&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;&lt;STRONG class="markup--strong markup--p-strong"&gt;When to set play event&lt;/STRONG&gt;: Start of the media playback&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;Key Components for the play event:&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;&lt;IMG class="progressiveMedia-image js-progressiveMedia-image jive-image" data-src="https://cdn-images-1.medium.com/max/800/1*BUUbxGrWeN2JK_-myaaK2g.png" src="https://cdn-images-1.medium.com/max/800/1*BUUbxGrWeN2JK_-myaaK2g.png" /&gt;&lt;/P&gt;&lt;P class="graf graf--p graf-after--figure"&gt;&lt;STRONG class="markup--strong markup--p-strong"&gt;When to set ping event: &lt;/STRONG&gt;Once in every 10 second would be ideal for main media content streaming and when the media playback resumes from a pause start or buffering state.&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;Key components of the ping event:&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;&lt;IMG class="progressiveMedia-image js-progressiveMedia-image jive-image" data-src="https://cdn-images-1.medium.com/max/800/1*ysFG27wl3-4F0s5vUiM-RA.png" src="https://cdn-images-1.medium.com/max/800/1*ysFG27wl3-4F0s5vUiM-RA.png" /&gt;&lt;/P&gt;&lt;P class="graf graf--p graf-after--figure"&gt;&lt;STRONG class="markup--strong markup--p-strong"&gt;When to set the pauseStart event:&lt;/STRONG&gt; The media playback is paused&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;Key Components of the pause event:&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;&lt;IMG class="progressiveMedia-image js-progressiveMedia-image jive-image" data-src="https://cdn-images-1.medium.com/max/800/1*LCmcXv360z3LfzKSJScfyg.png" src="https://cdn-images-1.medium.com/max/800/1*LCmcXv360z3LfzKSJScfyg.png" /&gt;&lt;/P&gt;&lt;P class="graf graf--p graf-after--figure"&gt;&lt;STRONG class="markup--strong markup--p-strong"&gt;When to set the sessionEnd event:&lt;/STRONG&gt; The media playback ends&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;Key Components of the sessionEnd event:&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;&lt;IMG class="progressiveMedia-image js-progressiveMedia-image jive-image" data-src="https://cdn-images-1.medium.com/max/800/1*In69xers8iYkpkr6Jhi56A.png" src="https://cdn-images-1.medium.com/max/800/1*In69xers8iYkpkr6Jhi56A.png" /&gt;&lt;/P&gt;&lt;P class="graf graf--p graf-after--figure"&gt;&lt;STRONG class="markup--strong markup--p-strong"&gt;When to set the sessionComplete event: &lt;/STRONG&gt;The visitor moved to different page or screen of the experience&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;Key components of the sessionComplete event:&lt;/P&gt;&lt;P class="aspectRatioPlaceholder is-locked"&gt;&lt;IMG class="progressiveMedia-image js-progressiveMedia-image jive-image" data-src="https://cdn-images-1.medium.com/max/800/1*f6nlIvMb6nvNh5rwrVd2uQ.png" src="https://cdn-images-1.medium.com/max/800/1*f6nlIvMb6nvNh5rwrVd2uQ.png" /&gt;&lt;/P&gt;&lt;H3 class="graf graf-after--figure graf--h3"&gt;Validation of the Implementation&lt;/H3&gt;&lt;P class="graf graf--p graf-after--h3"&gt;On successful implementation of the above apis in the mentioned order and manner, the Analytics server will merge the summarized table sent from the heartbeat server. This is a server side forward mechanism. In order to validate this implementation, Analysis workspace and the afore mentioned Adobe Analytics variables would be helpful.&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;A recap on the data being sent:&lt;/P&gt;&lt;OL class="postList"&gt;&lt;LI&gt;Visitor ID and behaviour data are sent to Adobe Analytics server&lt;/LI&gt;&lt;LI&gt;Visitor ID and Media Events are sent to Heartbeat Analytics server&lt;/LI&gt;&lt;/OL&gt;&lt;P class="graf graf--p graf-after--li"&gt;&lt;/P&gt;&lt;P class="graf graf--p graf-after--li"&gt;We should be able to breakdown Visitor ID variable from Analytics server Hits with Media Name Variable from the Heartbeat server hits and appropriate metrics like Media Initiates, Plays , Pauses etc.. would be reported in the breakdown. This would mark the success of the implementation. Mission Accomplished !!!&lt;/P&gt;&lt;P class="graf graf--p graf-after--li"&gt;&lt;/P&gt;&lt;H3 class="graf graf-after--p graf--h3"&gt;Conclusion&lt;/H3&gt;&lt;P class="graf graf--p graf-after--h3"&gt;As mentioned in the Introduction, this a humble effort &lt;IMG src="https://experienceleaguecommunities.adobe.com/legacyfs/online/emoticons/happy.png" /&gt; and looking forward to experts in the Adobe Analytics World to come up with better versions and media application.&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;The essentials in implementing an API-only Media Analytics framework, would be the knowledge of the Adobe APIs, the platform libraries and the Media Player events.&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;There will be new media experiences like VR, Fitness Bands, TV stick etc... that are coming up and it might not be scalable to rely on the SDKs from the Analytics Platforms. It would be beneficial for Adobe Analytics strategist to leverage APIs for onboarding data from the new platforms.&lt;/P&gt;&lt;P class="graf graf--p graf-after--p graf--trailing"&gt;&lt;/P&gt;&lt;P class="graf graf--p graf-after--p graf--trailing"&gt;Hope this blog helps you gaining confidence in experimenting with the API-only Media Analytics Implementation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 24 Dec 2018 12:17:28 GMT</pubDate>
    <dc:creator>acsarma</dc:creator>
    <dc:date>2018-12-24T12:17:28Z</dc:date>
    <item>
      <title>Media Stream Analytics by connecting the APIs of Adobe Experience Cloud</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-analytics-discussions/media-stream-analytics-by-connecting-the-apis-of-adobe/m-p/279974#M1672</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The topic was originally authored and featured at Medium by Myself. Then I realized, it would be beneficial to reach out to the community and share the knowledge. Happy learning everyone &lt;IMG src="https://experienceleaguecommunities.adobe.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H3 class="graf graf-after--h3 graf--h3"&gt;Introduction&lt;/H3&gt;&lt;P class="graf graf--p graf-after--h3"&gt;Media customers have been dependent on Video Heartbeat Library SDK for measuring Media Playback. Since the release of Media Collection API some months ago, there are efforts by customers and experts in trying to integrate it in to their Media Playback.&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;This blog outlies the steps to implement a Media Stream AnalyticsData Collection Framework using only the APIs of Experience Cloud ID (ECID) service, Adobe Analytics (Data Insertion API) and Heartbeat Server. Let’s get started with the framework !!&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;Please note that this a humble effort &lt;IMG src="https://experienceleaguecommunities.adobe.com/legacyfs/online/emoticons/happy.png" /&gt; and looking forward to experts in the Adobe Analytics World to come up with better versions and media application&lt;/P&gt;&lt;H3 class="graf graf-after--p graf--h3"&gt;&lt;/H3&gt;&lt;H3 class="graf graf-after--p graf--h3"&gt;Some Handy Documentation Links&lt;/H3&gt;&lt;P class="graf graf--p graf-after--h3"&gt;Experience Cloud ID service API : &lt;A class="markup--anchor markup--p-anchor" data-href="https://marketing.adobe.com/resources/help/en_US/mcvid/mcvid-direct-integration.html" href="https://marketing.adobe.com/resources/help/en_US/mcvid/mcvid-direct-integration.html" rel="nofollow noopener" target="_blank"&gt;https://marketing.adobe.com/resources/help/en_US/mcvid/mcvid-direct-integration.html&lt;/A&gt;&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;Adobe Analytics Data Insertion API: &lt;A class="markup--anchor markup--p-anchor" data-href="https://helpx.adobe.com/in/analytics/kb/data-insertion-api-post-method-adobe-analytics.html" href="https://helpx.adobe.com/in/analytics/kb/data-insertion-api-post-method-adobe-analytics.html" rel="nofollow noopener" target="_blank"&gt;https://helpx.adobe.com/in/analytics/kb/data-insertion-api-post-method-adobe-analytics.html&lt;/A&gt;&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;Media Collection API: &lt;A class="markup--anchor markup--p-anchor" data-href="https://marketing.adobe.com/resources/help/en_US/sc/appmeasurement/hbvideo/mc-api-overview.html" href="https://marketing.adobe.com/resources/help/en_US/sc/appmeasurement/hbvideo/mc-api-overview.html" rel="nofollow noopener" target="_blank"&gt;https://marketing.adobe.com/resources/help/en_US/sc/appmeasurement/hbvideo/mc-api-overview.html&lt;/A&gt;&lt;/P&gt;&lt;H3 class="graf graf-after--p graf--h3"&gt;&lt;/H3&gt;&lt;H3 class="graf graf-after--p graf--h3"&gt;Platform Agnsotic framework&lt;/H3&gt;&lt;P class="graf graf--p graf-after--h3"&gt;This framework is expected to be platform agnostic. Depending on the platform the appropriate API request/response handling libraries needed to be loaded. Here is a sample list of platforms and API request/response handlers:&lt;/P&gt;&lt;OL class="postList"&gt;&lt;LI&gt;Web/JS — XMLHttpRequest&lt;/LI&gt;&lt;LI&gt;Android — Retrofit or okhttp3&lt;/LI&gt;&lt;LI&gt;Unity — UnityWebRequest&lt;/LI&gt;&lt;LI&gt;and the list goes on&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;SPAN class="graf graf--p graf-after--li"&gt;Across all these platforms, it is necessary to maintain the same sequence of API calls:&lt;/SPAN&gt;&lt;/P&gt;&lt;OL class="postList"&gt;&lt;LI&gt;Identifying the visitor using ECID API&lt;/LI&gt;&lt;LI&gt;Registering the visitor with Adobe Analytics&lt;/LI&gt;&lt;LI&gt;Streaming events in to the Heartbeat API server&lt;/LI&gt;&lt;/OL&gt;&lt;H3 class="graf graf-after--li graf--h3"&gt;&lt;/H3&gt;&lt;H3 class="graf graf-after--li graf--h3"&gt;1. Identifying the visitor using ECID API&lt;/H3&gt;&lt;P class="graf graf--p graf-after--h3"&gt;The ECID API is a simple request to the Demdex server of the Adobe Experience Cloud Instance which would return an Identifier for the Visitor or the client.&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;&lt;STRONG class="markup--strong markup--p-strong"&gt;When to trigger: &lt;/STRONG&gt;at the load of a visitor session, independent of the availability of the media content, like load of a page or load of a screen in a mobile app or load of home screen in an OTT device.&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;Key components of the request would look like:&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;&lt;IMG class="progressiveMedia-image js-progressiveMedia-image jive-image" data-src="https://cdn-images-1.medium.com/max/800/1*BnA0IIR-qstThtyuFrdOaQ.png" src="https://cdn-images-1.medium.com/max/800/1*BnA0IIR-qstThtyuFrdOaQ.png" /&gt;&lt;/P&gt;&lt;H3 class="graf graf-after--figure graf--h3"&gt;2. Registering the visitor with Adobe Analytics&lt;/H3&gt;&lt;P class="graf graf--p graf-after--h3"&gt;Sending the above obtained visitor id (mid) and the Org Id to the Analytics tracking server, would suffice in registering the visitor in the Analytics servers. However for debugging purpose, it is advised to add few more custom variables in the Query String Parameter&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;&lt;STRONG class="markup--strong markup--p-strong"&gt;When to trigger:&lt;/STRONG&gt; At page or screen load complete.&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;Key components of the request would look like:&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;&lt;IMG class="progressiveMedia-image js-progressiveMedia-image jive-image" data-src="https://cdn-images-1.medium.com/max/800/1*NG3f5Hkpx28Q73evAVIllw.png" src="https://cdn-images-1.medium.com/max/800/1*NG3f5Hkpx28Q73evAVIllw.png" /&gt;&lt;/P&gt;&lt;H3 class="graf graf-after--figure graf--h3"&gt;3. Streaming events in to the Heartbeat API server&lt;/H3&gt;&lt;P class="graf graf--p graf-after--h3"&gt;As of the above two steps, we have established a visitor being identified in the Analytics server. Now we would be sending the heartbeat stream events to the heartbeat api server which would server-side forward to the analytics server. As mentioned previously, the &lt;STRONG class="markup--strong markup--p-strong"&gt;Visitor ID will be the primary connecting key between the Analytics server and the Heartbeat server&lt;/STRONG&gt;.&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;There are several stream events for the Heartbeat tracking server. This blog would cover the essential events that are required for tracking a complete media playback. Post practicing these handson, you would be equipped with enough knowledge on how to implement the rest. List of events covered:&lt;/P&gt;&lt;OL class="postList"&gt;&lt;LI&gt;sessionStart — Initiates a heartbeat/media stream session at heartbeat server&lt;/LI&gt;&lt;LI&gt;play — Sets the event for start of a media content&lt;/LI&gt;&lt;LI&gt;ping — Heartbeats&lt;/LI&gt;&lt;LI&gt;pauseStart — Sets the event for pausing the media content&lt;/LI&gt;&lt;LI&gt;sessionEnd — Sets the event for completion of a media content&lt;/LI&gt;&lt;LI&gt;sessionComplete — Compelte the heartbeat/media stream session&lt;/LI&gt;&lt;/OL&gt;&lt;P class="graf graf--p graf-after--li"&gt;&lt;/P&gt;&lt;P class="graf graf--p graf-after--li"&gt;All these events are sent to the heartbeat tracking server, which appears similar to the analytics tracking server, except the “.sc.” would be replaced by “.d2.hb-api”, which points to the heartbeat api tracking server. Example:&lt;/P&gt;&lt;OL class="postList"&gt;&lt;LI&gt;Analytics server = abc123corp.sc.omtrd.net&lt;/LI&gt;&lt;LI&gt;Heartbeat API server = abc123corp.d2.hb-api.omtrdc.net&lt;/LI&gt;&lt;/OL&gt;&lt;P class="graf graf--p graf-after--li"&gt;&lt;/P&gt;&lt;P class="graf graf--p graf-after--li"&gt;Knowledge of the Media player api would be essential for this step. For example a HTML5 player would emit the following events via its API: &lt;A class="markup--anchor markup--p-anchor" data-href="https://html.spec.whatwg.org/multipage/media.html#mediaevents" href="https://html.spec.whatwg.org/multipage/media.html#mediaevents" rel="nofollow noopener" target="_blank"&gt;https://html.spec.whatwg.org/multipage/media.html#mediaevents&lt;/A&gt;. It is necessary for the platform developer to tap into these events using the event listener of the platforms.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;Now let’s start sending the stream events to the heartbeat server&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;&lt;STRONG class="markup--strong markup--p-strong"&gt;When to set sessionStart:&lt;/STRONG&gt; Begin of a media playback engagement&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;Key Components for the sessionStart API request:&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;&lt;IMG class="progressiveMedia-image js-progressiveMedia-image jive-image" data-src="https://cdn-images-1.medium.com/max/800/1*O-JtDJE2rzbsoAnDCNh9kg.png" src="https://cdn-images-1.medium.com/max/800/1*O-JtDJE2rzbsoAnDCNh9kg.png" /&gt;&lt;/P&gt;&lt;P class="graf graf--p graf-after--figure"&gt;For the subsequent events, it is suggested to develop an OOPS function which would scale across all the media events and send the API request. The subsequent api request have a similar api request json format&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;&lt;STRONG class="markup--strong markup--p-strong"&gt;When to set play event&lt;/STRONG&gt;: Start of the media playback&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;Key Components for the play event:&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;&lt;IMG class="progressiveMedia-image js-progressiveMedia-image jive-image" data-src="https://cdn-images-1.medium.com/max/800/1*BUUbxGrWeN2JK_-myaaK2g.png" src="https://cdn-images-1.medium.com/max/800/1*BUUbxGrWeN2JK_-myaaK2g.png" /&gt;&lt;/P&gt;&lt;P class="graf graf--p graf-after--figure"&gt;&lt;STRONG class="markup--strong markup--p-strong"&gt;When to set ping event: &lt;/STRONG&gt;Once in every 10 second would be ideal for main media content streaming and when the media playback resumes from a pause start or buffering state.&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;Key components of the ping event:&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;&lt;IMG class="progressiveMedia-image js-progressiveMedia-image jive-image" data-src="https://cdn-images-1.medium.com/max/800/1*ysFG27wl3-4F0s5vUiM-RA.png" src="https://cdn-images-1.medium.com/max/800/1*ysFG27wl3-4F0s5vUiM-RA.png" /&gt;&lt;/P&gt;&lt;P class="graf graf--p graf-after--figure"&gt;&lt;STRONG class="markup--strong markup--p-strong"&gt;When to set the pauseStart event:&lt;/STRONG&gt; The media playback is paused&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;Key Components of the pause event:&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;&lt;IMG class="progressiveMedia-image js-progressiveMedia-image jive-image" data-src="https://cdn-images-1.medium.com/max/800/1*LCmcXv360z3LfzKSJScfyg.png" src="https://cdn-images-1.medium.com/max/800/1*LCmcXv360z3LfzKSJScfyg.png" /&gt;&lt;/P&gt;&lt;P class="graf graf--p graf-after--figure"&gt;&lt;STRONG class="markup--strong markup--p-strong"&gt;When to set the sessionEnd event:&lt;/STRONG&gt; The media playback ends&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;Key Components of the sessionEnd event:&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;&lt;IMG class="progressiveMedia-image js-progressiveMedia-image jive-image" data-src="https://cdn-images-1.medium.com/max/800/1*In69xers8iYkpkr6Jhi56A.png" src="https://cdn-images-1.medium.com/max/800/1*In69xers8iYkpkr6Jhi56A.png" /&gt;&lt;/P&gt;&lt;P class="graf graf--p graf-after--figure"&gt;&lt;STRONG class="markup--strong markup--p-strong"&gt;When to set the sessionComplete event: &lt;/STRONG&gt;The visitor moved to different page or screen of the experience&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;Key components of the sessionComplete event:&lt;/P&gt;&lt;P class="aspectRatioPlaceholder is-locked"&gt;&lt;IMG class="progressiveMedia-image js-progressiveMedia-image jive-image" data-src="https://cdn-images-1.medium.com/max/800/1*f6nlIvMb6nvNh5rwrVd2uQ.png" src="https://cdn-images-1.medium.com/max/800/1*f6nlIvMb6nvNh5rwrVd2uQ.png" /&gt;&lt;/P&gt;&lt;H3 class="graf graf-after--figure graf--h3"&gt;Validation of the Implementation&lt;/H3&gt;&lt;P class="graf graf--p graf-after--h3"&gt;On successful implementation of the above apis in the mentioned order and manner, the Analytics server will merge the summarized table sent from the heartbeat server. This is a server side forward mechanism. In order to validate this implementation, Analysis workspace and the afore mentioned Adobe Analytics variables would be helpful.&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;A recap on the data being sent:&lt;/P&gt;&lt;OL class="postList"&gt;&lt;LI&gt;Visitor ID and behaviour data are sent to Adobe Analytics server&lt;/LI&gt;&lt;LI&gt;Visitor ID and Media Events are sent to Heartbeat Analytics server&lt;/LI&gt;&lt;/OL&gt;&lt;P class="graf graf--p graf-after--li"&gt;&lt;/P&gt;&lt;P class="graf graf--p graf-after--li"&gt;We should be able to breakdown Visitor ID variable from Analytics server Hits with Media Name Variable from the Heartbeat server hits and appropriate metrics like Media Initiates, Plays , Pauses etc.. would be reported in the breakdown. This would mark the success of the implementation. Mission Accomplished !!!&lt;/P&gt;&lt;P class="graf graf--p graf-after--li"&gt;&lt;/P&gt;&lt;H3 class="graf graf-after--p graf--h3"&gt;Conclusion&lt;/H3&gt;&lt;P class="graf graf--p graf-after--h3"&gt;As mentioned in the Introduction, this a humble effort &lt;IMG src="https://experienceleaguecommunities.adobe.com/legacyfs/online/emoticons/happy.png" /&gt; and looking forward to experts in the Adobe Analytics World to come up with better versions and media application.&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;The essentials in implementing an API-only Media Analytics framework, would be the knowledge of the Adobe APIs, the platform libraries and the Media Player events.&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;&lt;/P&gt;&lt;P class="graf graf--p graf-after--p"&gt;There will be new media experiences like VR, Fitness Bands, TV stick etc... that are coming up and it might not be scalable to rely on the SDKs from the Analytics Platforms. It would be beneficial for Adobe Analytics strategist to leverage APIs for onboarding data from the new platforms.&lt;/P&gt;&lt;P class="graf graf--p graf-after--p graf--trailing"&gt;&lt;/P&gt;&lt;P class="graf graf--p graf-after--p graf--trailing"&gt;Hope this blog helps you gaining confidence in experimenting with the API-only Media Analytics Implementation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Dec 2018 12:17:28 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-analytics-discussions/media-stream-analytics-by-connecting-the-apis-of-adobe/m-p/279974#M1672</guid>
      <dc:creator>acsarma</dc:creator>
      <dc:date>2018-12-24T12:17:28Z</dc:date>
    </item>
  </channel>
</rss>

