WARNING: concrete5 5.6 and earlier are end-of-life. Sales from the marketplace have now ended. Click here to learn more about this transition.

Targeted Content

 

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:

  • If the user is not logged in
  • If the user is in a certain group
  • If a session variable is present(more on that later)
  • referring URL contains a value (useful for tracking adsense or displaying targeted adsense content). This means that you can target people that search for "Ford Flex" through google and then land on your site. Your referring url will contain "q=Ford+Flex", so when they land on your site you can greet them with a content block or a block inside a scrapbook specifically created for that search.
  • New - current url contains a string. For example http://example.com?adsenseCampaign3, set up a filter for current url, and input "?adsenseCampaign3"

Possible uses:

  1. Paid Content. If a user is in a certain group, you display paid tutorial videos.
  2. Premium Content. If a user is not in a certain group, they get to see adsense or banner ads.
  3. Language Selection: Using the custom  template in combination with looking at a session value, you can  programmatically display scrapbooks or content based on this value.  This works great for multiple language sites, and with this block you could theoretically create entire multiple language sites by touching very little code.
  4. Adsense Campaigns

Targeted Content allows you to either display a scrapbook’s items, or you can create content-block type content right in the block itself. 

Block workflow:

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.  

 

Purchase

Sales have ended due to EOL

Approved by PRB

Our 30 Day Support Policy

  • Replies to tickets every few days.

Support Hosted

  • On marketplace.concretecms.com