Skip to content

Commit ab5da57

Browse files
Fix incomplete ALLURE_NO_ANALYTICS opt-out in report html template (via #3332)
1 parent 3e7dde9 commit ab5da57

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

allure-generator/src/main/resources/tpl/index.html.ftl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@
8989
</#if>
9090
<#if analyticsDisable == false>
9191
<script async src="https://www.googletagmanager.com/gtag/js?id=G-FVWC4GKEYS"></script>
92-
</#if>
9392
<script>
9493
window.dataLayer = window.dataLayer || [];
9594
function gtag(){dataLayer.push(arguments);}
@@ -100,6 +99,7 @@
10099
'single_file': ${reportDataFiles?has_content?string}
101100
});
102101
</script>
102+
</#if>
103103
<#if reportDataFiles?has_content>
104104
<script async>
105105
window.reportDataReady = false;

allure-generator/src/test/java/io/qameta/allure/core/ReportWebGeneratorTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,9 @@ void shouldDisableAnalytics(@TempDir final Path tempDirectory) {
7676
assertThat(indexHtml)
7777
.isRegularFile()
7878
.content(StandardCharsets.UTF_8)
79-
.doesNotContain("googletagmanager");
79+
.doesNotContain("googletagmanager")
80+
.doesNotContain("G-FVWC4GKEYS")
81+
.doesNotContain("dataLayer");
8082
}
8183

8284
/**

0 commit comments

Comments
 (0)