Customising site appearance and functionality for different users


(Ryan Archer) #1

Just wondering if there is a set of features we can use within Squiz Matrix to customise how a website appears and behaves according to the type of user that is accessing the resource.

 

Just had our stakeholders put it to us that they want to customise the website behaviour based on three groups of user that access and use the website and they all have different needs and priorities. So things like menus, quicklinks and content will change and optimise according to their priorities and needs.

 

Page listing could be used for some dashboard menus/widgets and include assets more relevant to that particular group. Groups would first choose the group they belong to from a menu on the homepage (that would be setup with cookies for subsequent visits to make that process easier for return visits).

 

Other content like sliders with relevant links would also change according to type of visitor.

 

I have looked into what Squiz Matrix can do with 'Tagging' and it seems the closest thing right now to what we are looking for. We are very KEEN to avoid duplication and optimise on resources being used and piece them together differently according to visitor type and requirements/priorities.

 

Just interested to know if any other developers have attempted this type of project before and if so, what kind of constraints are there and what is the limit of possible customisation and possible trade offs and considerations.

 

Cheers.


(Anthony Ponomarenko) #2

Sounds like you want to use Conditions. http://manuals.matrix.squizsuite.net/asset-screens/chapters/conditions 


(Nick Papadatos) #3

try this URL http://manuals.matrix.squizsuite.net/designs/chapters/show-if-design-area#in-user-group


(Douglas (@finnatic at @waikato)) #4

Sounds like you want to use Conditions. http://manuals.matrix.squizsuite.net/asset-screens/chapters/conditions 

 

How do Conditions relate to Contexts with this sort of config?  Is that Contexts can't do user group checks?


(Ryan Archer) #5

@Anthony, that link you gave me is broken. I think this may be the correct link here http://manuals.matrix.squizsuite.net/asset-screens/chapters/conditions

We have yet to upgrade to version 5 yet, so this might be the motivator for change.

 

Not sure why it is broken, the URL appears identical. Can conditions cascade down the tree?


(Ryan Archer) #6

From what I can see, conditions and contexts could work together very well to give much flexibility and customisation of data and presentation to the user. Obviously the problem is that means more work for developers and content authors updating multiple versions of the same asset (if we go and customise that far) and I don't think this could really be avoided (such is the case of showing web pages in different languages).

 

What I am thinking of doing is more of a compromise whereby users would enter a portal/dashboard homepage where they would all see the main common content the same but have "shortcut links" or "Quicklinks" menus that will take them to the specific area that they need to go rather than go digging/searching for it. Perhaps making use of paint layout contexts.

 

But what I am definitely more interested about is using conditions to switch the design file applied to a page so it could show a different set of menu options or add/remove menus. I think what Nick specified earlier about writing user group conditional into the design file seems up to the task and alot less complicated. I can see it all really depends on the scope of customisation.

 

My only real issue with using user groups to customise the content is that not everyone using our websites will have defined user access. We need something different and I think using GET or POST variables might be something we could use to achieve this.

 

Can I run this scenario past everyone to check if it is valid?

A person (staff member) visits the site and is not logged in. They go to an index page with three buttons asking them what group they belong to. Once they choose an option, this is send as a GET/POST variable. Then the condition set up on the portal/dashboard page looks for this GET/POST variable and triggers the conditions accordingly. Next time the user visits the page, they should not need to be asked what group they belong to again because a cookie records this information and sends it to SQUIZ MATRIX automatically - would this scenario work?


(Nic Hubbard) #7

Can I run this scenario past everyone to check if it is valid?

A person (staff member) visits the site and is not logged in. They go to an index page with three buttons asking them what group they belong to. Once they choose an option, this is send as a GET/POST variable. Then the condition set up on the portal/dashboard page looks for this GET/POST variable and triggers the conditions accordingly. Next time the user visits the page, they should not need to be asked what group they belong to again because a cookie records this information and sends it to SQUIZ MATRIX automatically - would this scenario work?

 

Have you looked into using a Trigger to link that user into a specific user group?


(Ryan Archer) #8

@Nic,

 

No I have not. I have been using Squiz Matrix for about 2 months so I still consider myself a full NOOB. Where should I be looking within Triggers?

My limited knowledge of triggers was just about sending communication to team members about updates on assets or activities within the system. Did not know front end users (who are not logged in) could fire off triggers.


(Douglas (@finnatic at @waikato)) #9

Are the users public users or users known to you?  I think Nic's suggestion isn't workable with public users in standard Matrix (although Nic or others might know a way).  Marketo - http://www.squiz.net/nz/platform/marketo- does I believe (if I have the right product).


(Ryan Archer) #10

They would be considered public facing visitors, that's why I suspected that Triggers would not work. I am checking out the Marketo solution https://vimeo.com/79112966 but it obviously has a nice price tag attached to it and seems more from a marketing perspective but I can see with the "university website" example they are showing how the data can be customised on the portal page.

 

Probably will not be within the scope of the project I want to do. I am hoping I can use Conditions and Contexts but push GET variables into cookies so visitors won't always have to click a button (or whatever other handler) for the system to know that they are a particular type of user that requires access to personalised content.


(Nic Hubbard) #11

Ah, Public User. Yeah, not sure how to go about that without using cookies. I would using at justing jQuery Cookie: 

 

https://github.com/carhartl/jquery-cookie


(Bart Banda) #12

Yea for public users, you could easily set a cookie, and then have a matrix trigger action that links the current user into a user group just for their session based on the cookie. http://manuals.matrix.squizsuite.net/triggers/chapters/trigger-actions#Join-User-Group-for-Session 

 

Access any client side cookie with %globals_cookie_{cookiename}% keyword. 

 

Should work for public users. 


(Ryan Archer) #13

Nice, I have explored jquery-cookie and got that working ok. My next question is what 'EVENT' do I make the Trigger look for? I had a read through the SQUIZ Matrix manual and all the events I can think of are:

  • Public User Session Created
  • REST Response received

The rest appears to be straightforward enough - have the trigger perfrom the "Join User Group for Session" based on the stored cookie (using the keyword to extract the cookie information). Then the design customisation takes care of the rest and arranges assets on the page according to user group using IF/ELSE conditionals http://manuals.matrix.squizsuite.net/designs/chapters/show-if-design-area.

 

Also would there be a way of achieving this using HTML5 Local Storage method as opposed to using cookies? I ask this as I am concerned that some of our users may be operating from behind strict networks where cookies may be disabled. Highly unlikely, but I do need to consider it.


(Ryan Archer) #14

Think I may have figured it out - feel free to correct me if I am mistaken...

 

Step 1 - Set the trigger event to "Asset Accessed"

Step 2 - set the condition to "Keyword Value", using the cookie keyword

step 3 - Set the trigger action to "Join User Group for Session"


(Bart Banda) #15

Think I may have figured it out - feel free to correct me if I am mistaken...

 

Step 1 - Set the trigger event to "Asset Accessed"

Step 2 - set the condition to "Keyword Value", using the cookie keyword

step 3 - Set the trigger action to "Join User Group for Session"

 

That will work, but will also run every time a page is accessed, which is overkill. I would probably use the public user session started event so it only runs once for the user.

 

Or at least have another condition check so that it doesn't run the "Join User Group" action every time. 


(Ryan Archer) #16

Hi Bart,

 

I think it is best to do it on "Asset Accessed" as we intend on having a jump menu constantly present within the website that will change the users temporarily assigned user group (via a cookie change) and that can happen anytime and anywhere within the website.

 

For the "pulbic user session started" it runs only once and that is the inherent problem right there - I need this action to fire globally so I require overkill I suppose....right now I am trying to put nested content within a show_if design area and I am not getting any results - is it even possible? I just don't want to have to write all the customised code into the design file itself if I can help it.

 

Oh yeah, is it possible to access keywords via HTML5 webstorage rather than a cookie? I am just concerned about users/networks who block/disable cookies (although i think they would find it very difficult to use the www...)


(Bart Banda) #17

I think it is best to do it on "Asset Accessed" as we intend on having a jump menu constantly present within the website that will change the users temporarily assigned user group (via a cookie change) and that can happen anytime and anywhere within the website.

 

Yea right, if you are doing that you probably need asset accessed. 

 

 

right now I am trying to put nested content within a show_if design area and I am not getting any results - is it even possible? I just don't want to have to write all the customised c

 

You should be able to, but might be cleaner to do it via paint layouts or in nested standard pages instead. You can put your conditions in there. 

Also remember that you'll need to server the site uncached, both no browser cache and no matrix cache for the areas you want to have dynamic.

 

 

 

Oh yeah, is it possible to access keywords via HTML5 webstorage rather than a cookie? I am just concerned about users/networks who block/disable cookies (although i think they would find it very difficult to use the www...)

 

No it is not. An alternative would be to create session variables and use those instead. 


(Ryan Archer) #18

 

You should be able to, but might be cleaner to do it via paint layouts or in nested standard pages instead. You can put your conditions in there. 

Also remember that you'll need to server the site uncached, both no browser cache and no matrix cache for the areas you want to have dynamic.

 

Thanks Bart, I don't know much about paint layouts yet. I think I tried nesting pages using 

<MySource_AREA id_name="news_panel" design_area="nest_content" />

But that does not work nested within a SHOW_IF statement. Am I understanding correctly here?


(Ryan Archer) #19

I tried normal_menu design area as well. It would appear as though "Design Areas" do not work within the <MySource_THEN> tags.

 

What dynamic data is possible then? I want to have a different menu layout appear, different slider and widgets also - all customised to the user group that the user is currently viewing the page from. I still can't see how paint layouts can do this with metadata as the best example in the documentation is to have a author/time datestamp on an event...

 

I want to be able to have a menu_normal design area and also a nested Content Design Area within the <MySource_THEN> tags, they do seem the best fit for this kind of configuration.


(Nic Hubbard) #20

I tried normal_menu design area as well. It would appear as though "Design Areas" do not work within the <MySource_THEN> tags.

 

What dynamic data is possible then? I want to have a different menu layout appear, different slider and widgets also - all customised to the user group that the user is currently viewing the page from. I still can't see how paint layouts can do this with metadata as the best example in the documentation is to have a author/time datestamp on an event...

 

I want to be able to have a menu_normal design area and also a nested Content Design Area within the <MySource_THEN> tags, they do seem the best fit for this kind of configuration.

 

It should work. Look at my other post: http://forums.squizsuite.net/index.php?showtopic=11939

 

Basically, you need to declare the mysource_area tag elsewhere (like at the top of the file) and make sure to use print=no. Then you use the mysource_print tag to print that design area elsewhere.