Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-138892

As a developer, I can disable the AC tracking when using the journal-article taglib to render web content

    Details

      Description

      Motivation:

      Developers of widgets, fragments and templates can use the Journal Article taglib to render a web content with a specific template. For example:

      <@liferay_journal["journal-article"]
      articleId=myArticleId
      ddmTemplateKey="51128"
      groupId=themeDisplay.getScopeGroupId()
      /> 

      Produces this HTML:

      <div class="journal-content-article " data-analytics-asset-id="37914" data-analytics-asset-title="My Title" data-analytics-asset-type="web-content">
       My Content 
      </div>

      Notice that the HTML contains data-analytics-* attributes. When Analytics Cloud is enabled, the Analytics Cloud client will automatically track a view event when that code is displayed.

      However, in some cases developers may want to render a web content without tracking that particular view event (e.g. in a teaser). Currently, it is not possible to skip this event.

      This story aims to provide a mechanism for developers to selectively disable the tracking of the view web content event when using the journal article taglib. By default, the bevahior will be the current one.

      Acceptance criteria:

      • Given Analytics Cloud tracking is configured 
      • When a web content is rendered (e.g. in an ADT) with the journal-article taglib and the attribute dataAnalyticsTrackEnabled is set to "false"
      • Then viewing the page where the web content is rendered does not registers a view of that web content in AC. The generated HMTL looks like:
      <div class="journal-content-article " data-analytics-asset-id="37914" data-analytics-asset-title="My Title" data-analytics-asset-type="web-content" data-analytics-no-track>
      My Content 
      </div>

       

       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              julia.molano Julia Molano
              Reporter:
              eduardo.garcia Eduardo García (Inactive)
              Engineering Assignee:
              Team Delta
              Recent user:
              Marcellus Tavares
              Participants of an Issue:
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:

                  Packages

                  Version Package