`php working
mkdir drupal && cd drupal && curl -sSL https://www.drupal.org/download-latest/tar.gz | tar -xz --strip-components=1
Fetch the unomi module module
composer require drupal/unomi:2.x-dev
Fetch the personalisation module module
composer require drupal/dropsolid_personalisation:1.x-dev
Fetch the mautic paragraph module
composer require drupal/mautic_paragraph:1.x-dev
Fetch the asset injector module
composer require drupal/asset_injector
Command that gives you the admin login link:
php ./core/scripts/drupal quick-start demo_umami
Command that is more stable without login link:
php ./core/scripts/drupal quick-start demo_umami -s -vvv
Internal Page Cache module Should be disabled
Surf to : http://drupal.localhost:8888/en/admin/modules/uninstall
Disable the module.
Manually enable modules
dropsolid_personalisation
& mautic_paragraph
& asset_injector
http://drupal.localhost:8888/en/admin/modules
This should give you no errors.
in the dropsolid Platform, under CDP >capture, find your capture script. https://platform.dropsolid.com/personalisation/13/info?tab=capture
(function(d) {
// attach script tag and defer
function downloadJSAtOnload() {
var wf = d.createElement('script'), s = d.scripts[0];
wf.src = 'https://datacapture.dropsolid.com/8ac23bbf-5e59-4635-92f6-a477ea45542b/capture.js'
wf.defer = true;
wf.setAttribute( 'data-cdp-uuid', '8ac23bbf-5e59-4635-92f6-a477ea45542b' );
wf.setAttribute( 'data-region', 'europe-west1' );
s.parentNode.insertBefore(wf, s);
}
downloadJSAtOnload();
})(document);
Navigate to /en/admin/config/development/asset-injector/js
on your website.
Click "Add js injector"
Enter a name for the script e.g. "personalisation".
Under 'Code', paste the javascript code without the <script>
tags
window.dsdc = window.dsdc || function() {(dsdc.q = dsdc.q || []).push(arguments)}; dsdc.l = +new Date;
window.dsdc('beforeRequest', function(data) {
changedCapture = data.requestData;
urlParams = new URLSearchParams(window.location.search);
utmCampaign = urlParams.get('utm_campaign');
utmSource = urlParams.get('utm_source');
changedCapture.te__utmCampaign = utmCampaign;
changedCapture.te__utmSource = utmSource;
dsdc.updateCapture(changedCapture);
});
- Navigate to
https://platform.dropsolid.com/personalisation/
- Click on your instance.
- Click in
info
. - Copy the HOST / PORT / PAth / CLient ID & Secret from here.
Navigate to /en/admin/config/services/unomi
on your drupal installation.
- select
Dropsolid platform
- florista01-unomi-florista.dropsolid-sites.com
- Select
https
- Enter the Host, port, Username and password (key & secret).
- Navigate to
/en/admin/structure/block
- Click on
Place block
next toContent
- Select "Add custom block"
- Choose the Type
Basic Block
You are now creating your basic block. - Input relevant title / description
- Select the Personalisation "Segment" you wish the block to appear for.
- "Save"
- Go to an incognito window and open http://drupal.localhost:8888
- Notice the block not being there
- Now open http://drupal.localhost:8888?utm_campaign=campaignofnick
- Refresh the page
- Notice the form being there!
- Go the the chrome extension https://chrome.google.com/webstore/detail/cdp-segment-selector/bbdonaoapcgdfoidcbmkpcopcbnbmcad
- Install this
- Navigate to http://drupal.localhost:8888 and click the Dropsolid logo on the top right.
- Log in with the given credentials
- See the simulation of personalization