davidx1
davidx1

Reputation: 3673

CQ5 how to show different content to different visitors?

I know that CQ5 have tools to help divide visitors into different segments based on particular segment traits.

By default there are about a dozen built in segment traits like "IP Range", "Visitor Age", "Facebook Profile", "Referral Keywords" etc.

But how do we create other traits that's not avaliable out of the box? For example, if we wanted to filter visitors based on "Google Profile", or "Returning Visitor", or "Browser type"?

EDIT: To clarify, I want to build custom segmentation components that appears into the side kick for the authors to simply drag and drop.

How do we go about creating these custom traits/filters?

Upvotes: 4

Views: 536

Answers (1)

Harish Menda
Harish Menda

Reputation: 71

You need create component with below properties:

  • allowedParents : *
  • componentGroup : Segmentation
  • sling:resourceSuperType : /libs/cq/personalization/components/traits

In this component you can create similar dialog like in /libs/cq/personalization/components/traits/generic/dialog

And you can customize the list as per the requirement. You can handle the list of customized traits through listeners by reading from a json.

There on you can use the component while adding rules in segment.

I have done similar implementation let me know if you need any further help.

Upvotes: 1

Related Questions