📩Email Signup
Form Event
The form
event can be used to track user information. To track a form submission event, use the track function with "form" as the eventType
, and any appropriate name as eventName
, and make sure to add the required attributes in the field parameters
. The parameters
field can contain an email or a telegram username, optionally including the user's name.
string
Required *
*optional when telegram is set
telegram
string
Required *
Telegram username *optional when email is set
name
string
Optional
Example only with required email field:
safary.track({
eventType: "form",
eventName: "newsletter-signup",
parameters: {
email: "user@example.com"
}
})
Example only with required telegram field:
safary.track({
eventType: "form",
eventName: "telegram-signup",
parameters: {
telegram: "user123"
}
})
Example with optional name field included:
safary.track({
eventType: "form",
eventName: "newsletter-signup",
parameters: {
email: "user@example.com",
name: "John Doe"
}
})
safary.track({
eventType: "form",
eventName: "telegram-signup",
parameters: {
telegram: "user123",
name: "Jane Doe"
}
})
Please note that the parameters
field can also include any other information you believe is useful to track, as long as you follow the guidelines in the Custom Parameters subsection.
See the last section of this page for troubleshooting.
Troubleshooting
Required arguments:
Note that
eventType
+eventName
are required arguments forsafary.track
.Therefore, for example, the following would not work:
safary.track( { eventName: "main offer" } )
// Gives:
// ERROR: safary.track(): eventType is undefined.
Required format:
Note that the
parameters
used in the both tracking functions is required to be an object.Therefore, for example, passing a string as
parameters
would not work:
safary.track( { eventType: "buy", eventName: "main offer", parameters: "ETH" } )
// Gives:
// ERROR: safary.track(): parameters is not an object.
Last updated