Skip to content

Open source, privacy-first web analytics. Lightweight, cookie-free Google Analytics alternative. Self-hosted or cloud.

Script v2: Rename form submission system event (#5512)

Artur Patabf39a4c34fb3
diff --git a/tracker/npm_package/CHANGELOG.md b/tracker/npm_package/CHANGELOG.md
index 7e4e0f8fa2..f553fb1b55 100644
--- a/tracker/npm_package/CHANGELOG.md
+++ b/tracker/npm_package/CHANGELOG.md
@@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Unreleased
+- Rename `Form Submission` system event to `Form: Submission`.
+
## [0.2.2] - 2025-06-16
- Support for `config.transformRequest`
diff --git a/tracker/package.json b/tracker/package.json
index e1c766bfdc..df16feff1d 100644
--- a/tracker/package.json
+++ b/tracker/package.json
@@ -1,5 +1,5 @@
{
- "tracker_script_version": 18,
+ "tracker_script_version": 19,
"type": "module",
"scripts": {
"deploy": "node compile.js",
diff --git a/tracker/src/custom-events.js b/tracker/src/custom-events.js
index 85290a6ba6..4445cae986 100644
--- a/tracker/src/custom-events.js
+++ b/tracker/src/custom-events.js
@@ -176,7 +176,7 @@ export function init() {
if (COMPILE_CONFIG && config.formSubmissions) {
function trackFormSubmission(e) {
if (e.target.hasAttribute('novalidate') || e.target.checkValidity()) {
- track('Form Submission', { props: { path: location.pathname } });
+ track('Form: Submission', { props: { path: location.pathname } });
}
}
diff --git a/tracker/test/form-submissions.spec.ts b/tracker/test/form-submissions.spec.ts
index 8cdf20f27b..95b3a81444 100644
--- a/tracker/test/form-submissions.spec.ts
+++ b/tracker/test/form-submissions.spec.ts
@@ -38,7 +38,7 @@ test('does not track form submissions when the feature is disabled', async ({
expectedRequests: [{ n: 'pageview' }],
refutedRequests: [
{
- n: 'Form Submission'
+ n: 'Form: Submission'
}
]
})
@@ -70,7 +70,7 @@ test.describe('form submissions feature is enabled', () => {
shouldIgnoreRequest: [isPageviewEvent, isEngagementEvent],
expectedRequests: [
{
- n: 'Form Submission',
+ n: 'Form: Submission',
p: { path: url }
}
]
@@ -101,7 +101,7 @@ test.describe('form submissions feature is enabled', () => {
shouldIgnoreRequest: [isPageviewEvent, isEngagementEvent],
expectedRequests: [
{
- n: 'Form Submission',
+ n: 'Form: Submission',
p: { path: url }
}
]
@@ -140,7 +140,7 @@ test.describe('form submissions feature is enabled', () => {
shouldIgnoreRequest: [isPageviewEvent, isEngagementEvent],
expectedRequests: [
{
- n: 'Form Submission',
+ n: 'Form: Submission',
p: { path: url }
}
]
@@ -174,7 +174,7 @@ test.describe('form submissions feature is enabled', () => {
shouldIgnoreRequest: [isPageviewEvent, isEngagementEvent],
expectedRequests: [
{
- n: 'Form Submission',
+ n: 'Form: Submission',
p: { path: url }
}
]
@@ -208,7 +208,7 @@ test.describe('form submissions feature is enabled', () => {
expectedRequests: [{ n: 'pageview' }],
refutedRequests: [
{
- n: 'Form Submission'
+ n: 'Form: Submission'
}
]
})
@@ -241,7 +241,7 @@ test.describe('form submissions feature is enabled', () => {
expectedRequests: [{ n: 'pageview' }],
refutedRequests: [
{
- n: 'Form Submission'
+ n: 'Form: Submission'
}
]
})
@@ -276,7 +276,7 @@ test.describe('form submissions feature is enabled', () => {
shouldIgnoreRequest: [isPageviewEvent, isEngagementEvent],
expectedRequests: [
{
- n: 'Form Submission',
+ n: 'Form: Submission',
p: { path: url }
}
]
@@ -290,7 +290,7 @@ test.describe('form submissions feature is enabled', () => {
shouldIgnoreRequest: [isPageviewEvent, isEngagementEvent],
expectedRequests: [
{
- n: 'Form Submission',
+ n: 'Form: Submission',
p: { path: url }
}
]