The addon comes with a Facade for interacting with the Tracker: \Thoughtco\StatamicCacheTracker\Facades\Tracker
Adding your own tracking data
If you have your own custom tracking data, for example for one of your own tags, you can register them on the Facade. Please bear in mind tracking only happens while the response is generated, so where possible use augmentation hooks.
Using a closure:
useThoughtco\StatamicCacheTracker\Facades\Tracker;//...Tracker::addAdditionalTracker(function($tracker,$next){// run your logic, for example in an augmentation hook// then call:$tracker->addContentTag('your-tag-here');return$next($tracker);});
useThoughtco\StatamicCacheTracker\Facades\Tracker;//...Tracker::addAdditionalTracker(function($tracker,$next){// run your logic, for example in an augmentation hook// then call:$tracker->addContentTag('your-tag-here');return$next($tracker);});