Download the PHP package symbiote/silverstripe-local-personalisation without Composer

On this page you can find all versions of the php package symbiote/silverstripe-local-personalisation. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package silverstripe-local-personalisation

Local Profiles

Build Status Latest Stable Version Latest Unstable Version Total Downloads License

Overview

Builds a profile of a visitor, "tagging" behaviour based on the pages visited, actions performed, location, or device characteristics. Preserves privacy since the profile is stored in the browser only, without relying on server data or logged-in user information.

This module enables marketers and developers to collaborate effectively, by providing both a CMS user interface and an API.

CMS users can define "rule sets" to group one or more "rules". Each rule determines when and how behaviour should be tagged. For example, "if URL contains 'marketing', then add 'interested-in-marketing' tag".

These tags can then be used for matching rules against objects managed in the CMS (such as pages or content blocks), and show/hide them based on in-browser decisions. Alternatively, you can control this behaviour programmatically, enabling sophisticated rule definitions that wouldn't be feasible in a CMS UI.

Because all decision making happens in the browser, you can still serve cached responses with all variations delivered to the browser, but only some variations shown to the visitor.

Example use cases:

Limitations:

Composer

Javascript and CSS

Add the required frontend logic into your main template:

Alternatively, check app/webpack.config.js on how to compile the requirements into your own frontend bundle.

Metadata

Personalisation rules are loaded as JavaScript metadata.

By loading this as a separate route, you avoid inline scripts and make it easier to secure your website with a Content Security Policy. It also helps with caching: Personalisation rules apply immediately on save, even when the page output might be cached (via HTTP caching or static publishing).

Apply the extension

In order for the frontend logic to be triggered, you generally want to apply an extension to at least one content object. This adds a new "Personalisation" tab in the CMS.

Apply on pages:

Apply on content blocks:

Modify templates

Now add some metadata to the markup for the content object you're rendering: $p13nClasses to your class attribute, and $p13nAttributes to the element.

Example for the content blocks holder template (store in themes/mytheme/templates/DNADesign/Elemental/Layout/ElementHolder.ss):

Test Operation

You should be ready to define rules now. Check for Profile.js console messages in your browser to ensure everything is set up correctly.

Developer Usage

Rules for profile segmentation

Rules are defined in the CMS

They can be triggered for;

Manually applying rules

By applying the PersonalisationExtension to a content object, you can use $p13nClasses and $p13nAttributes in your templates.

Alternatively, you can build the required markers from scratch:

Events

The following events are triggered and can be responded to in custom code

Bind to these as document.addEventListener('local_profile_add_tag', function (eventData) {})

Local Development

Build

The frontend assets are stored in app/. You can use yarn to install dependencies and kick off a build:

Javascript, HTTPS and hot reloading

To fully test the functionality locally, you'll need to run your webserver on HTTPS which is required for geolocation in most browsers now.

When developing the Javascript code for the module, it can be helpful to get source maps (breakpoints!) and hot reloading. The module already has a yarn devserver command. You'll need to extend the webpack.config.js to work around CORS issues when including it in your page (see webpack devserver docs).

Now you can use the dev server (usually on port 4200) with the preferred hostname for your Silverstripe website:

Caution: In order to use geolocation without HTTPS in Chrome, you need to allow insecure origins.


All versions of silverstripe-local-personalisation with dependencies

PHP Build Version
Package Version
Requires silverstripe/framework Version ^4.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package symbiote/silverstripe-local-personalisation contains the following files

Loading the files please wait ....