Skip to content

Add offline tracker capability using onerror callback and localStorage #23

Description

@rcs

I'd like to add offline support for the tracker.

I think this can be added with an onerror callback on the image load. Would it make sense to push this through the a "setBeaconError" for the tracker, or would you prefer a different approach?

// in initialization
_snaq.push(['setBeaconError', function() { ... } ]);

...

// Added to tracker
setBeaconError: function( onError ) {
  configBeaconError = onError;
}

..
// In getImage.
if( configBeaconError ) {
  img.onerror = configBeaconError;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:enhancementNew features or improvements to existing features.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions