Skip to content

[FEATURE] Google Tag Manager#312

Merged
MattiasNilsson merged 2 commits intomasterfrom
gtm
Oct 31, 2017
Merged

[FEATURE] Google Tag Manager#312
MattiasNilsson merged 2 commits intomasterfrom
gtm

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
@MattiasNilsson MattiasNilsson deleted the gtm branch October 31, 2017 12:42
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