Use the analytics data rendering plug-in tag
Use the AnalyticsData rendering plug-in tag to inject microformats for Active Site Analytics into the web content.The microformats gather information about the content items that are rendered on the portal pages. We can insert more than one tag into the content.
Add the AnalyticsData plug-in tag to the content or presentation template design. Each tag can contain only one attribute. Use the following syntax:
[Plugin:AnalyticsData property="" | element="" | value= "" css-class = ""]To select a value used in the microformat for Active Site Analytics, use one of the following attributes:
- property
- Use this attribute to select one of the supported properties of the web content item. This attribute can take the following values:
- id
- The unique identifier of the content.
- title
- The display title of the content.
- path
- The unique path of the content in the library.
- lastmodified
- The date when the content was last modified.
- authors
- The author or authors of the content. If the content has more than one author, one microformat tag is written for each author.
- element
- Use this attribute to select an element from the content. The element must be a text or short text element type. For the value of this attribute, specify the name of the element to be selected.
- value
- Use this attribute to pass a text value to the plug-in. If you set this attribute, also set the CSS class value using the attribute css-class. See the following description of this attribute for details.
In a single reference to a tag, we can use only one of the previous attributes. To use more than one attribute, add another reference to the tag.
- css-class
- Use this attribute to control which CSS class is used for the microformat tags. This attribute is mandatory when we specify the value attribute. The attribute is optional when we use the property attribute or the element attribute. If you do not specify this attribute with the property attribute or the element attribute, the CSS class is determined from the value of the property attribute or the element attribute. In this case, the CSS class is generated by prefixing asa.wcm.content_item. and the value of the property attribute or the element attribute.
Examples
- [Plugin:AnalyticsData property="title"]
- This setting selects the display title of the content item. The following microformat is inserted in the page:
<span style="display:none" class="asa.wcm.content_item.title">Display title</span>
- [Plugin:AnalyticsData property="authors" css-class="com.acme.content.authors"]
- This setting selects the authors of the content item. If we use this setting and a custom CSS class, the following microformats are inserted in the page:
<span style="display:none" class="com.acme.content.authors">Author 1</span> <span style="display:none" class="com.acme.content.authors">Author 2</span>
- [Plugin:AnalyticsData element="element1"]
- This setting selects the text value of the element on the content item. The following microformat is inserted in the page:
<span style="display:none" class="asa.wcm.content_item.element1">Value of element with name element1</span>
- [Plugin:AnalyticsData element="element1" css-class="asa.wcm.content_item.path"]
- This setting selects the text value of the element on the content item. The following microformat is inserted in the page:
<span style="display:none" class="asa.wcm.content_item.path">Value of element with name element1</span>
- [Plugin:AnalyticsData value="Some text" css-class="asa.wcm.content_item.title"]
- This setting uses the text specified by the value attribute. The following microformat is inserted in the page:
<span style="display:none" class="asa.wcm.content_item.title">Some text</span>
- [Plugin:AnalyticsData css-class="asa.wcm.content_item.title" value="[Property context='current' type='content' field='title']"]
- This setting passes the value of the nested [Property] tag to the plug-in. The following microformat is inserted in the page:
<span style="display:none" class="asa.wcm.content_item.title">Display title from nested property tag</span>
- [Plugin:AnalyticsData css-class="asa.tag.SitePromotion" value="Halloween2012"]
- This setting creates a site promotion tag with the value passed to the plug-in. The following microformat is inserted in the page:
<span style="display:none" class="asa.tag.SitePromotion">Halloween2012</span>