Meta tags:
description= When building an application that works offline, it s crucial to understand how users interact with your app without connectivity to optimize their experience. Analytics providers like Piwik PRO typically require a network connection to send data to their servers. If connectivity is unavailable, the…;
Headings (most frequently used words):
sdk, the, enable, of, progressive, web, applications, js, api, other, automatic, tracking, integration, pwa, browser, consent, manager, android, flutter, ios, react, native, integrations, data, activation, piwik, pro, module, for, status, user, internet, connection, app, installation, event,
Text of the page (most frequently used words):
the (32), track (20), piwik (17), pro (17), #tracking (11), web (10), piwikpro (10), pwa (10), requests (9), enable (8), for (8), custom (8), and (8), data (8), sdk (8), progressive (7), applications (7), from (7), you (7), using (7), methods (7), your (6), integration (6), automatic (5), event (5), user (5), connection (5), module (5), this (5), with (5), offline (5), cross (5), getting (5), started (5), status (4), internet (4), import (4), can (4), will (4), that (4), failed (4), analytics (4), platform (4), setuserid (4), dispatch (4), advanced (4), usage (4), api (4), app (3), jsx (3), when (3), application (3), retried (3), all (3), interaction (3), users (3), 1234 (3), service (3), worker (3), connectivity (3), content (3), log (3), react (3), trackgoal (3), trackecommerceorder (3), trackecommercecartupdate (3), startnewsession (3), setvisitoridlifetime (3), setvisitoridfromdeeplink (3), setvisitorid (3), setsessiontimeout (3), setsessionhash (3), setdispatchinterval (3), setanonymizationstate (3), getuseragent (3), getsessionhash (3), checkaudiencemembership (3), ecommerceremovefromcart (3), ecommerceproductdetailview (3), ecommerceorder (3), ecommercecartupdate (3), ecommerceaddtocart (3), docs (3), installation (2), method (2), index (2), use (2), while (2), interactions (2), initialize (2), fetch (2), time (2), these (2), their (2), building (2), other (2), pages (2), native (2), tracksocialinteraction (2), tracksearch (2), trackscreen (2), trackoutlink (2), trackexception (2), trackecommerceremovefromcart (2), trackecommerceproductdetailview (2), trackecommerceaddtocart (2), trackdownload (2), trackcustomevent (2), trackcampaign (2), trackapplicationupdate (2), trackapplicationinstall (2), setuseremail (2), setprefixing (2), setoptout (2), isanonymizationon (2), getvisitorid (2), getuserid (2), applicationupdate (2), applicationinstall (2), setcustomvariable (2), setcustomdimension (2), sendapplicationdownload (2), optout (2), dryrun (2), audiencemanagergetprofileattributes (2), additem (2), flutter (2), trackcontentinteraction (2), trackcontentimpression (2), outlink (2), download (2), consent (2), management (2), changelog (2), home (2), copy, page, enableinstalltracking, want, customers, install, following, enableinternetconnectiontracking, include, default, object, top, level, such, differentiate, between, non, tracing, solution, generate, information, about, whenever, lost, address, one, optional, described, below, however, only, code, above, means, indistinguishable, those, succeed, first, attempt, collect, won, able, identify, which, occurred, was, setup, need, queue, retry, simplest, way, get, working, containerurl, example, com, containerid, 12345678, 1234567890ab, collection, call, handles, process, adds, handlers, cache, ppms, container, scripts, additionally, retrying, automatically, sets, updates, current, date, request, payload, ensuring, timestamps, reflect, original, cdt, receives, via, http, script, add, handler, detect, sent, stores, indexeddb, retries, them, once, restored, our, addresses, issue, ability, handle, providers, like, typically, require, network, send, servers, unavailable, fail, missing, reports, they, never, happened, works, crucial, understand, how, interact, without, optimize, experience, mcp, server, skip, link, disable, delay, attribute, layer, name, security, policy, csp, popup, examples, profile, identity, resolution, attributes, activation, accelerated, mobile, amp, integrations, trackprofileattributes, trackinteraction, trackimpression, trackecommerce, setincludedefaultcustomvariables, setdryrun, isprefixingon, getuseremail, getsessiontimeout, getprofileattributes, getoptout, getincludedefaultcustomvariables, getdryrun, getdispatchinterval, sourcetrafficversion, sourcetrafficname, sessionhash, isprefixingenabled, visitoridlifetime, eventsperrequest, samplerate, appversion, appname, useragent, setvisitoridfrom, deletequeuedevents, visitorid, userid, useremail, sessiontimeout, sendviews, sendview, sendtransaction, sendsocialinteraction, sendsearch, sendaudiencemanagerattribute, sendoutlink, sendgoal, sendexception, sendevent, senddownload, sendcontentinteraction, sendcontentimpression, sendcampaign, maxnumberofqueuedevents, maxageofqueuedevents, isanonymizationenabled, includedefaultcustomvariable, dispatchinterval, deviceid, checkmembership, ios, trackprofileattribute, trackecommercetransaction, trackcustomvariable, trackcustomdimension, trackappinstall, setincludedefaultvariables, readuserprofileattributes, getvisitoridlifetime, visitvariables, variable, socialinteraction, search, screens, screen, order, impression, goal, exception, dimension, campaign, setusermail, settrafficsourceversion, settrafficsourcename, setofflinecachesize, setofflinecacheage, setincludedefaultcustomvars, setdryruntarget, setdispatchtimeout, setdispatchmode, setdeviceid, setapplicationdomain, items, getdeviceid, audiencemanagersetprofileattribute, android, tracksavechoicesclick, trackreminderwidgetview, trackrejectallclick, trackprivacypolicylinkview, trackmainformview, trackclosebuttonclick, trackagreetoallclick, setinitialcompliancesettings, setcompliancesettings, senddatarequest, openconsentform, getnewcompliancetypes, getcompliancetypes, getcompliancesettings, form, overview, manager, setuserisanonymous, setsessionidstrictprivacymode, setiptracking, getvisitorinfo, resetuserid, deanonymizeuser, settrackerurl, settimingdatasamplingonpageload, setsiteinspectorsetup, setsiteid, setreferrerurl, setlinktrackingtimer, setdomains, setdocumenttitle, setcustomurl, setenableclienthints, setapiurl, gettrackerurl, gettimingdatasamplingonpageload, getdomains, getsiteid, getpiwikurl, getlinktrackingtimer, discardhashtag, getcurrenturl, addtracker, disableperformancetracking, client, configuration, trackerror, settrackingsourceprovider, settrackingsource, setrequestmethod, setrequestcontenttype, setgenerationtimems, setcustomrequestprocessing, setdonottrack, setcountprerendered, redirectfile, ping, killframe, gettrackingsource, gettrackingsourceprovider, getnumtrackedpageviews, enablejserrortracking, getconfigidpageview, appendtotrackingurl, addlistener, miscellaneous, trackheartbeat, enableheartbeattimer, disableheartbeattimer, heartbeat, setecommerceview, removeecommerceitem, getecommerceitems, clearecommercecart, addecommerceitem, ecommerce, removedownloadclasses, getdownloadextensions, getdownloadclasses, tracklink, adddownloadclasses, setlinkclasses, setignoreclasses, setdownloadextensions, setdownloadclasses, removedownloadextensions, getconfigdownloadextensions, enablelinktracking, disablelinktracking, adddownloadextensions, storecustomvariablesincookie, getcustomvariable, deletecustomvariable, variables, setcustomdimensionvalue, getcustomdimensionvalue, deletecustomdimension, getcustomdimension, dimensions, setcrossdomainlinkingtimeout, iscrossdomainlinkingenabled, getcrossdomainlinkingurlparameter, enablecrossdomainlinking, customcrossdomainlinkvisitoridgetter, disablecrossdomainlinking, customcrossdomainlinkdecorator, domain, linking, setvisitorcookietimeout, setvisitoridcookie, setsessioncookietimeout, setsecurecookie, setcookiepath, setreferralcookietimeout, setcookienameprefix, setcookiedomain, hascookies, getcookiepath, getsessioncookietimeout, getcookiedomain, getconfigvisitorcookietimeout, enablecookies, disablecookies, deletecookies, cookie, trackvisiblecontentimpressions, trackcontentinteractionnode, trackcontentimpressionswithinnode, trackallcontentimpressions, logallcontentblocksonpage, tracksitesearch, trackpageview, trackevent, basic, events, plain, javascript, vue, nuxt, next, gatsby, angular, frameworks, browser, jump, agents, visit, https, developers, llms, txt, formatted, markdown, endpoints, openapi,
Text of the page (random words):
progressive web applications integration pwa for ai agents visit https developers piwik pro llms txt for an index of all pages formatted in markdown and endpoints in openapi jump to content home docs web api changelog log in docs log in home docs web api changelog progressive web applications integration pwa browser js api frameworks angular gatsby next js nuxt react vue getting started plain javascript methods basic events trackgoal trackevent trackpageview tracksitesearch content tracking logallcontentblocksonpage trackallcontentimpressions trackcontentimpressionswithinnode trackcontentimpression trackcontentinteractionnode trackcontentinteraction trackvisiblecontentimpressions cookie management deletecookies disablecookies enablecookies getconfigvisitorcookietimeout getcookiedomain getsessioncookietimeout getcookiepath hascookies setcookiedomain setcookienameprefix setreferralcookietimeout setcookiepath setsecurecookie setsessioncookietimeout setvisitoridcookie setvisitorcookietimeout cross domain linking customcrossdomainlinkdecorator disablecrossdomainlinking customcrossdomainlinkvisitoridgetter enablecrossdomainlinking getcrossdomainlinkingurlparameter iscrossdomainlinkingenabled setcrossdomainlinkingtimeout custom dimensions getcustomdimension deletecustomdimension setcustomdimension getcustomdimensionvalue setcustomdimensionvalue custom variables deletecustomvariable getcustomvariable storecustomvariablesincookie setcustomvariable download and outlink adddownloadextensions disablelinktracking enablelinktracking getconfigdownloadextensions removedownloadextensions setdownloadclasses setdownloadextensions setignoreclasses setlinkclasses adddownloadclasses tracklink getdownloadclasses getdownloadextensions removedownloadclasses ecommerce addecommerceitem clearecommercecart ecommerceaddtocart ecommercecartupdate ecommerceorder ecommerceproductdetailview getecommerceitems ecommerceremovefromcart removeecommerceitem setecommerceview trackecommercecartupdate trackecommerceorder heartbeat disableheartbeattimer enableheartbeattimer trackheartbeat miscellaneous addlistener appendtotrackingurl getconfigidpageview enablejserrortracking getnumtrackedpageviews gettrackingsourceprovider gettrackingsource killframe ping redirectfile setcountprerendered setdonottrack setcustomrequestprocessing setgenerationtimems setrequestcontenttype setrequestmethod settrackingsource settrackingsourceprovider trackerror tracking client configuration disableperformancetracking addtracker getcurrenturl discardhashtag getlinktrackingtimer getpiwikurl getsiteid getdomains gettimingdatasamplingonpageload gettrackerurl setapiurl setenableclienthints setcustomurl setdocumenttitle setdomains setlinktrackingtimer setreferrerurl setsiteid setsiteinspectorsetup settimingdatasamplingonpageload settrackerurl user management deanonymizeuser getuserid getvisitorid resetuserid getvisitorinfo setiptracking setsessionidstrictprivacymode setuserid setuserisanonymous consent manager js api overview custom consent form methods getcompliancesettings getcompliancetypes getnewcompliancetypes openconsentform senddatarequest setcompliancesettings setinitialcompliancesettings trackagreetoallclick trackclosebuttonclick trackmainformview trackprivacypolicylinkview trackrejectallclick trackreminderwidgetview tracksavechoicesclick android sdk methods audiencemanagergetprofileattributes audiencemanagersetprofileattribute checkaudiencemembership dispatch ecommerceaddtocart ecommercecartupdate ecommerceorder ecommerceproductdetailview ecommerceremovefromcart getsessionhash getdeviceid getuseragent isanonymizationon items additem setanonymizationstate setapplicationdomain setdispatchinterval setdeviceid setdispatchmode setdispatchtimeout setdryruntarget setincludedefaultcustomvars setofflinecacheage setofflinecachesize setprefixing setoptout setsessiontimeout setsessionhash settrafficsourcename settrafficsourceversion setusermail setuserid setvisitorid setvisitoridfromdeeplink setvisitoridlifetime track applicationinstall startnewsession track applicationupdate track campaign track dimension track download track event track exception track goal track impression track order track interaction track outlink track screen track screens track search track socialinteraction track sendapplicationdownload track variable track visitvariables getting started using piwik pro sdk cross platform tracking advanced usage flutter sdk methods checkaudiencemembership dispatch dryrun getsessionhash getuseragent getvisitoridlifetime readuserprofileattributes optout setanonymizationstate setdispatchinterval setincludedefaultvariables setsessionhash setuseremail setsessiontimeout setuserid setvisitorid setvisitoridfromdeeplink trackappinstall setvisitoridlifetime trackapplicationinstall trackapplicationupdate trackcampaign trackcontentimpression trackcontentinteraction trackcustomdimension trackcustomvariable trackcustomevent trackdownload trackecommerceaddtocart trackecommercecartupdate trackecommerceorder trackecommerceproductdetailview trackecommercetransaction trackecommerceremovefromcart trackexception trackgoal trackprofileattribute trackoutlink trackscreen tracksearch tracksocialinteraction getting started using the flutter sdk advanced usage cross platform tracking ios sdk getting started methods additem audiencemanagergetprofileattributes checkmembership deviceid dispatchinterval dryrun ecommerceaddtocart ecommercecartupdate ecommerceorder ecommerceproductdetailview ecommerceremovefromcart includedefaultcustomvariable isanonymizationenabled maxageofqueuedevents maxnumberofqueuedevents optout sendapplicationdownload sendcampaign sendcontentimpression sendcontentinteraction senddownload sendevent sendexception sendgoal sendoutlink sendaudiencemanagerattribute sendsearch sendsocialinteraction sendtransaction sendview sendviews sessiontimeout setcustomdimension setcustomvariable startnewsession useremail userid visitorid applicationinstall applicationupdate dispatch deletequeuedevents setvisitoridfrom useragent appname appversion samplerate eventsperrequest visitoridlifetime isprefixingenabled sessionhash sourcetrafficname sourcetrafficversion using piwik pro sdk cross platform tracking advanced usage react native sdk advanced usage getting started methods checkaudiencemembership dispatch getdispatchinterval getdryrun getincludedefaultcustomvariables getoptout getprofileattributes getsessionhash getsessiontimeout getuseragent getuseremail getuserid getvisitorid isanonymizationon isprefixingon setanonymizationstate setdispatchinterval setdryrun setincludedefaultcustomvariables setoptout setprefixing setsessionhash setsessiontimeout setuseremail setuserid setvisitorid setvisitoridfromdeeplink setvisitoridlifetime startnewsession trackapplicationinstall trackapplicationupdate trackcampaign trackcustomevent trackdownload trackecommerce trackecommerceaddtocart trackecommercecartupdate trackecommerceorder trackecommerceproductdetailview trackecommerceremovefromcart trackexception trackgoal trackimpression trackoutlink trackinteraction trackprofileattributes trackscreen tracksearch tracksocialinteraction using piwik pro sdk for react native cross platform tracking other integrations accelerated mobile pages amp integration progressive web applications integration pwa web log analytics data activation custom attributes identity resolution profile building data import other custom popup examples content security policy csp custom data layer name skip link tracking with the data disable delay attribute mcp server progressive web applications integration pwa when building an application that works offline it s crucial to understand how users interact with your app without connectivity to optimize their experience analytics providers like piwik pro typically require a network connection to send data to their servers if connectivity is unavailable these requests will fail and the interactions will be missing from your reports as if they never happened our integration with progressive web applications pwa addresses this issue for piwik pro users by using the service worker s ability to handle failed requests piwik pro receives data via http requests so a service worker script can add a fetch handler to detect failed requests sent to analytics it stores these requests in indexeddb and retries them once connectivity is restored the pwa module for piwik pro handles this process it adds fetch handlers to cache the ppms js and container scripts for offline use additionally when retrying failed requests the module automatically sets or updates the cdt current date time in the request payload ensuring that timestamps in piwik pro reflect the time of the original user interaction enable the piwik pro module for progressive web applications to enable data collection from your pwa with piwik pro analytics call the initialize method in your service worker jsx import piwikpro from piwikpro pwa piwik pro piwikpro initialize containerurl example com containerid 12345678 1234 1234 1234 1234567890ab this setup is all you need to queue and retry failed requests to piwik pro and it s the simplest way to get piwik pro working offline however using only the code above means that retried requests will be indistinguishable from those that succeed on the first attempt while you ll collect all interaction data from offline users you won t be able to identify which interactions occurred while the user was offline to address this you can use one of the optional methods described below enable automatic tracking of the status of the user s internet connection to differentiate between retried and non retried requests you can enable automatic tracing of the internet connection status this solution will generate a custom event with information about the connection status whenever the internet is lost in your application include the default piwikpro object in the top level module such as index js jsx import piwikpro from piwikpro pwa piwik pro piwikpro enableinternetconnectiontracking enable automatic tracking of the app installation event if you want to track when your customers install the application as a custom event you can do so using the following method jsx import piwikpro from piwikpro pwa piwik pro piwikpro enableinstalltracking copy page enable the piwik pro module for progressive web applications enable automatic tracking of the status of the user s internet connection enable automatic tracking of the app installation event
|