Skip to content

Commit

Permalink
Merge pull request #2 from erkenes/feat/ee-cookieLifeTime
Browse files Browse the repository at this point in the history
feat: Add cookie lifetime and update the script tag
  • Loading branch information
gerdemann authored Oct 7, 2021
2 parents ddfe0ba + 8d40277 commit fe94a3d
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.idea/
1 change: 1 addition & 0 deletions Configuration/Settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ Avency:
Neos:
Etracker:
blockCookies: true
cookieLifeTime: null
Neos:
Neos:
fusion:
Expand Down
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
> Adds the etracker code in the html header.
## Authors & Sponsors
Michael Gerdemann - [email protected]
Michael Gerdemann - [email protected]<br>
Enes Erk - [email protected]

The development and the public-releases of this package is generously sponsored by our employer https://www.avency.de.

Expand Down Expand Up @@ -43,6 +44,19 @@ Avency:
blockCookies: false
```

[Documentation (German)](https://www.etracker.com/docs/integration-setup/einstellungen-accounts/etracker-cookies/etracker-cookies-aktivieren/#anleitung)

### Set cookie lifetime

```
Avency:
Neos:
Etracker:
cookieLifeTime: 24 # Amount of Months
```

[Documentation (German)](https://www.etracker.com/docs/integration-setup/einstellungen-accounts/etracker-cookies/laufzeit-von-etracker-cookies-selbst-bestimmen/)

## License

The MIT License (MIT). Please see [License File](./LICENSE.md) for more information.
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ prototype(Avency.Neos.Etracker:Component.Atom.EtrackerCode) < prototype(Neos.Fus
areas = ''
url = ''
blockCookies = true
cookieLifeTime = null

// Rendering
renderer = afx`
<!-- Copyright (c) 2000-2020 etracker GmbH. All rights reserved. -->
<!-- Copyright (c) 2000-2021 etracker GmbH. All rights reserved. -->
<!-- This material may not be reproduced, displayed, modified or distributed -->
<!-- without the express prior written permission of the copyright holder. -->
<!-- etracker tracklet 5.0 -->
Expand All @@ -17,7 +18,16 @@ prototype(Avency.Neos.Etracker:Component.Atom.EtrackerCode) < prototype(Neos.Fus
var et_areas = "{props.areas}";
var et_url = "{props.url}";
</script>
<script id="_etLoader" type="text/javascript" charset="UTF-8" data-block-cookies={props.blockCookies ? 'true' : false} data-respect-dnt="true" data-secure-code={props.key} src="//static.etracker.com/code/e.js"></script>
<script id="_etLoader"
type="text/javascript"
charset="UTF-8"
data-block-cookies={props.blockCookies ? 'true' : false}
data-respect-dnt="true"
data-cookie-lifetime={props.cookieLifeTime ? props.cookieLifeTime : false}
data-secure-code={props.key}
src="//code.etracker.com/code/e.js"
async
></script>
<!-- etracker tracklet 5.0 end -->
`
}
1 change: 1 addition & 0 deletions Resources/Private/Fusion/Override/Page.fusion
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ prototype(Neos.Neos:Page) {
pageName = ${q(documentNode).property('title')}
key = ${props.key}
blockCookies = ${Configuration.setting('Avency.Neos.Etracker.blockCookies')}
cookieLifeTime = ${Configuration.setting('Avency.Neos.Etracker.cookieLifeTime')}
url = Neos.Neos:NodeUri {
absolute = true
node = ${documentNode}
Expand Down

0 comments on commit fe94a3d

Please sign in to comment.