leuchtfeuer/typo3-audience-studio

Add-on TYPO3 extension that enhances the "EXT:marketing_automation" TYPO3 extension by connecting it to Salseforce Audience Studio

Fund package maintenance!
www.Leuchtfeuer.com
flossels

Installs: 149

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 3

Forks: 1

Open Issues: 0

Type:typo3-cms-extension

v1.2.0 2021-01-20 09:45 UTC

This package is auto-updated.

Last update: 2021-03-20 10:23:06 UTC


README

This TYPO3 extension provides an adapter for the marketing_automation to allow targeting users with personalised content.

To achieve that, users and segments from Audience Studio are imported from an Amazon S3 export, which can be configured in Audience Studio.

Installation

composer require leuchtfeuer/typo3-audience-studio Don't forget to activate the extension in the TYPO3 Extension Manager.

Configuration

Adding the Control Tag and cookie configuration

This adapter does not take care of adding the control tag to the HTML output of your website. Make sure to add it and put the following TYPO3 configuration into AdditionalConfiguration.php or any other appropriate place.

$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['audience_studio']['cookieName'] = 'yourcookiename';

Verify that a cookie with the name declared in the configuration is set for your website domain. The adapter relies on this cookie to be present and set.

Get cookie value from local storage

Since the AudienceStudio cookie is not set on the domain where your website is available, the cookie value must be read from the user's local storage. You can store the key of the local storage value in the configuration localStorageKey:

$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['audience_studio']['localStorageKey'] = 'yourlocalstoragekey';

In this case, the following lines of JavaScript will be added to the source code:

(function() {
    if (window.localStorage) {
        const KUID = localStorage.getItem('YOUR_LOCAL_STORAGE_KEY');
        if (KUID !== null) {
            let date = new Date();
            date.setTime(date.getTime() + (30 * 24 * 60 * 60 * 1000));
            document.cookie = 'YOUR_COOKIE_NAME=' + KUID + ';expires=' + date.toUTCString() + ';path=/';
        }
    }
})();

You can also add this script manually. Then you can just leave the configuration empty and the extension will not add the JavaScript to your page.

S3 Access configuration

Put the following TYPO3 configuration into AdditionalConfiguration.php or any other appropriate place.

$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['audience_studio']['storageConfiguration'] = [
    'key' => 'your S3 key',
    'secret' => 'your corresponding S3 secret',
    'region' => 'us-east-1', // Must be the correct region of your bucket
    'bucket' => 'your/bucket',
];

Import users and segments by using the following CLI command that comes with the extension:

vendor/bin/typo3 audience-studio:import

It is recommended to add this command as TYPO3 Scheduler task to be executed daily.

Persona configuration

Create Persona records as required in any system folder in the page tree. Each Persona is required to be associated with one or more Audience Studio segments. A Persona is matched when a user visits the website that is part of any segement selected in the Persona record.

Target content

By default the Marketing Automation extension allows targeting content and page records. Additional records can be optionally be activated for targeting.

Targeting is based on Personas. In the Access tab of the content or page record, select the Persona for which this record should be shown.