Skip to main content

Hello, everyone.

I’m start to study Amplitude for the integration with my project.

I have trying to add default event properties such as PageDomain, PageTitle, PagePath, etc. to my custom event.

I have using default events such as PageViewed, Start Session, etc. in my project, but from my requirements I need to define custom event.

I’d like to use default properties such as PageDomain, PageTitle, PagePath, etc. in my custom event.

What’s suggestion to add these properties to my custom event ?

I hope to anyone help me for this.

Thank you.

Hi Phoenix, you’ll have to add those properties yourself to the event you want to instrument. Fortunately, that’s pretty straightforward. You can look at exactly how our SDK extracts these properties from the window `location` here and mimic it: https://github.com/amplitude/Amplitude-TypeScript/blob/c87f8bead0ff7330ff39c9c5a8698ddb65f5eb8e/packages/plugin-page-view-tracking-browser/src/page-view-tracking.ts#L26


Great !!!


That’s works for me.


hank you for your help.


With the Amplitude GTM template updates, is this still the case?


Reply