Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Google Tag Manager #312

Merged
merged 2 commits into from
Oct 31, 2017
Merged

[FEATURE] Google Tag Manager #312

merged 2 commits into from
Oct 31, 2017

Conversation

pixelmatseriks
Copy link
Member

No description provided.

@@ -0,0 +1,21 @@
# Google Analytics track pageview and add script for event tracking
[globalString = LIT:{$themes.configuration.tracking.ga_gtmid} = /(GTM)-[a-zA-Z0-9]+/]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use an implementation without TYPO3 conditions.

These problem can be solved with an TypoScript if.

Every Condition is a performance problem.
Every condition is evaluated at every request.
An if is only evaluated once and the result is cached.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you provide an example how you want to implement it?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

page.headerData.17895 = TEXT
page.headerData.17895 {
	value = ...
	if.isTrue = {$themes.configuration.tracking.ga_gtmid}
}

page.3 = TEXT
page.3 {
	value = ...
	if.isTrue = {$themes.configuration.tracking.ga_gtmid}
}

See https://docs.typo3.org/typo3cms/TyposcriptReference/Functions/If/Index.html
The test with regex is not really needed.

@MattiasNilsson MattiasNilsson merged commit 17859dc into master Oct 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants