ampproject / ampproject/amphtml

Access to localStorage for Mgid ads

Open
#38,448 1 comment 0 reactions 0 assignees View on GitHub
INTENT TO IMPLEMENT Stale
Dominant language
JavaScript
Stars
14.9k
Forks
4.1k
PR merge metrics
No merged PRs in 30d

Description

### Summary

We need to access localStorage on website's domain for https://github.com/ampproject/amphtml/blob/main/ads/vendors/mgid.js

### Design Document

_No response_

### Motivation

Mgid ads use localStorage for proper calculating analytics data.

### Alternative Solutions

We need to store some data between page reloads. For example, we want to calculate page visits of user on current website. We will appreciate, if you'll tell us how to solve this problem using existing AMP API (if it's possible).

### Launch Tracker

_No response_

### Notifications

/cc @ampproject/wg-approvers

Contributor guide

Open the contributing guide

Research direction

Start with ads/vendors/mgid.js and trace how the Mgid vendor currently handles analytics state. Check the existing AMP APIs and storage restrictions for a supported way to preserve data across page reloads. Done means the issue has an approved implementation path, with the storage behavior and its validation documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.