Targeted Content was designed to allow you to show dynamic content based on the user, referrer, the current url or a session variable.
This is absolutely awesome to tie in with your google adsense spending, or to welcome someone coming from google, an email campaign, or really anything. This is also great to show and display advertising if a user is not in the "premium" group, or only if the user is not logged in. The possibilities here are endless.
Targeted allows the site owner to optionally display content based on the following rules:
Targeted Content allows you to either display a scrapbook’s items, or you can create content-block type content right in the block itself.
The block is loaded: The user is inspected, and if the user matches any selected rule, either the content or the select scrapbook is displayed. If the rules are not matched, no content is displayed. For site maintenance convenience, if the current user is able to edit the page and the page itself is in edit mode, then the block’s content is displayed.
Using session variables:
There is an example custom template that allows you to set up languages in your site. Simply add the block and set the custom template to: Language Selector
Then in your blocks, set up a filter of: If a certain session variable is set:
LANG equals ENGLISH, then show either a content block or a scrapbook.
It is that easy. Also, scrapbook items custom js and css files are included with the template, in addition to any addHeaderItems added via a block controller’s view or on_page_view method.
NOTE: Due to the dynamic nature of this block, whole page cache(otherwise known as emergency cache) may produce undesired results with this block.
If you want to populate your own session variables to tie in with this block, please use: HANALEI_TARGETED_CONTENT_SESSION_PREFIX.$sessionItemKey
This ensures that our session variables we are looking for will not negatively affect any other addons.