MCPcopy Index your code
hub / github.com/ampproject/amphtml / trigger

Method trigger

src/extension-analytics.js:97–108  ·  view source on GitHub ↗

* @param {string} eventType * @param {!JsonObject=} opt_vars A map of vars and their values.

(eventType, opt_vars)

Source from the content-addressed store, hash-verified

95 * @param {!JsonObject=} opt_vars A map of vars and their values.
96 */
97 trigger(eventType, opt_vars) {
98 devAssert(
99 this.config_['triggers'][eventType],
100 'Cannot trigger non initiated eventType'
101 );
102 triggerAnalyticsEvent(
103 this.parent_,
104 this.getEventTypeInSandbox_(eventType),
105 opt_vars,
106 /** enableDataVars */ false
107 );
108 }
109 /**
110 * @param {string} eventType
111 * @return {string}

Callers

nothing calls this directly

Calls 3

devAssertFunction · 0.90
triggerAnalyticsEventFunction · 0.90

Tested by

no test coverage detected