@firebase/analytics 0.7.10 → 0.7.11-canary.13550089f

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -68,7 +68,7 @@ export interface GtagConfigParams {
68
68
  * If set to false, disables all advertising features with `gtag.js`.
69
69
  * See {@link https://developers.google.com/analytics/devguides/collection/ga4/display-features | Disable advertising features }
70
70
  */
71
- 'allow_google_signals?': boolean;
71
+ 'allow_google_signals'?: boolean;
72
72
  /**
73
73
  * If set to false, disables all advertising personalization with `gtag.js`.
74
74
  * See {@link https://developers.google.com/analytics/devguides/collection/ga4/display-features | Disable advertising features }
@@ -246,3 +246,33 @@ export interface EventParams {
246
246
  page_path?: string;
247
247
  [key: string]: unknown;
248
248
  }
249
+ /**
250
+ * Consent status settings for each consent type.
251
+ * For more information, see
252
+ * {@link https://developers.google.com/tag-platform/tag-manager/templates/consent-apis
253
+ * | the GA4 reference documentation for consent state and consent types}.
254
+ * @public
255
+ */
256
+ export interface ConsentSettings {
257
+ /** Enables storage, such as cookies, related to advertising */
258
+ ad_storage?: ConsentStatusString;
259
+ /** Enables storage, such as cookies, related to analytics (for example, visit duration) */
260
+ analytics_storage?: ConsentStatusString;
261
+ /**
262
+ * Enables storage that supports the functionality of the website or app such as language settings
263
+ */
264
+ functionality_storage?: ConsentStatusString;
265
+ /** Enables storage related to personalization such as video recommendations */
266
+ personalization_storage?: ConsentStatusString;
267
+ /**
268
+ * Enables storage related to security such as authentication functionality, fraud prevention,
269
+ * and other user protection.
270
+ */
271
+ security_storage?: ConsentStatusString;
272
+ [key: string]: unknown;
273
+ }
274
+ /**
275
+ * Whether a particular consent type has been granted or denied.
276
+ * @public
277
+ */
278
+ export declare type ConsentStatusString = 'granted' | 'denied';
@@ -14,7 +14,7 @@
14
14
  * See the License for the specific language governing permissions and
15
15
  * limitations under the License.
16
16
  */
17
- import { ControlParams, EventParams, CustomParams } from './public-types';
17
+ import { ControlParams, EventParams, CustomParams, ConsentSettings } from './public-types';
18
18
  /**
19
19
  * Encapsulates metadata concerning throttled fetch requests.
20
20
  */
@@ -48,5 +48,6 @@ export interface Gtag {
48
48
  (command: 'config', targetId: string, config?: ControlParams | EventParams | CustomParams): void;
49
49
  (command: 'set', config: CustomParams): void;
50
50
  (command: 'event', eventName: string, eventParams?: ControlParams | EventParams | CustomParams): void;
51
+ (command: 'consent', subCommand: 'default' | 'update', consentSettings: ConsentSettings): void;
51
52
  }
52
53
  export declare type DataLayer = IArguments[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@firebase/analytics",
3
- "version": "0.7.10",
3
+ "version": "0.7.11-canary.13550089f",
4
4
  "description": "A analytics package for new firebase packages",
5
5
  "author": "Firebase <firebase-support@google.com> (https://firebase.google.com/)",
6
6
  "main": "dist/index.cjs.js",
@@ -37,18 +37,18 @@
37
37
  "typings:public": "node ../../scripts/build/use_typings.js ./dist/analytics-public.d.ts"
38
38
  },
39
39
  "peerDependencies": {
40
- "@firebase/app": "0.x"
40
+ "@firebase/app": "0.7.27-canary.13550089f"
41
41
  },
42
42
  "dependencies": {
43
- "@firebase/installations": "0.5.10",
44
- "@firebase/logger": "0.3.3",
45
- "@firebase/util": "1.6.1",
46
- "@firebase/component": "0.5.15",
43
+ "@firebase/installations": "0.5.11-canary.13550089f",
44
+ "@firebase/logger": "0.3.3-canary.13550089f",
45
+ "@firebase/util": "1.6.2-canary.13550089f",
46
+ "@firebase/component": "0.5.16-canary.13550089f",
47
47
  "tslib": "^2.1.0"
48
48
  },
49
49
  "license": "Apache-2.0",
50
50
  "devDependencies": {
51
- "@firebase/app": "0.7.26",
51
+ "@firebase/app": "0.7.27-canary.13550089f",
52
52
  "rollup": "2.72.1",
53
53
  "@rollup/plugin-commonjs": "21.1.0",
54
54
  "@rollup/plugin-json": "4.1.0",