File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed
Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ export default function Layout({ children }: { children: ReactNode }) {
9494 < Databuddy
9595 clientId = "OXmNQsViBT-FOS_wZCTHc"
9696 disabled = { process . env . NODE_ENV === "development" }
97- // scriptUrl="https://databuddy.b-cdn.net/databuddy.js"
97+ scriptUrl = "https://databuddy.b-cdn.net/databuddy.js"
9898 trackAttributes
9999 trackErrors
100100 trackOutgoingLinks
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ program
1515 . option ( "-m, --message <text>" , "Add a note to the deployment notification" )
1616 . option ( "-s, --skip-notification" , "Skip sending Discord notification" )
1717 . option ( "-t, --skip-tests" , "Skip running E2E tests before deployment" )
18+ . option ( "-b, --skip-build" , "Skip building before deployment" )
1819 . option ( "-p, --purge" , "Only purge cache, skip deployment" )
1920 . option ( "-v, --verbose" , "Enable verbose logging" )
2021 . parse ( process . argv ) ;
@@ -26,6 +27,7 @@ const options = program.opts<{
2627 message ?: string ;
2728 skipNotification ?: boolean ;
2829 skipTests ?: boolean ;
30+ skipBuild ?: boolean ;
2931 purge ?: boolean ;
3032 verbose : boolean ;
3133} > ( ) ;
@@ -276,8 +278,11 @@ async function purgePullZoneCache() {
276278
277279async function deploy ( ) {
278280 try {
279- if ( ! ( options . skipTests || options . dryRun ) ) {
281+ if ( ! options . skipBuild ) {
280282 await runBuild ( ) ;
283+ }
284+
285+ if ( ! ( options . skipTests || options . dryRun ) ) {
281286 await runTests ( ) ;
282287 }
283288
Original file line number Diff line number Diff line change @@ -161,20 +161,17 @@ export class Databuddy extends BaseTracker {
161161
162162 private trackPageExit ( ) {
163163 const timeOnPage = Math . round ( ( Date . now ( ) - this . pageStartTime ) / 1000 ) ;
164- const isBounce = this . interactionCount === 0 && timeOnPage < 10 ? 1 : 0 ;
165164
166165 this . _trackInternal ( "page_exit" , {
167166 time_on_page : timeOnPage ,
168167 scroll_depth : this . maxScrollDepth ,
169168 interaction_count : this . interactionCount ,
170169 page_count : this . pageCount ,
171- is_bounce : isBounce ,
172170 } ) ;
173171 }
174172
175173 private sendPageExitBeacon ( ) {
176174 const timeOnPage = Math . round ( ( Date . now ( ) - this . pageStartTime ) / 1000 ) ;
177- const isBounce = this . interactionCount === 0 && timeOnPage < 10 ? 1 : 0 ;
178175
179176 const event = {
180177 eventId : generateUUIDv4 ( ) ,
@@ -188,10 +185,8 @@ export class Databuddy extends BaseTracker {
188185 scroll_depth : this . maxScrollDepth ,
189186 interaction_count : this . interactionCount ,
190187 page_count : this . pageCount ,
191- is_bounce : isBounce ,
192188 } ;
193189
194- // Use sendBeacon for reliability on page unload
195190 this . sendBatchBeacon ( [ event ] ) ;
196191 }
197192
You can’t perform that action at this time.
0 commit comments