>

, 8: googleanalytics. 9: AMP analytics vendor docs URL. 10: UA-XXXXX-Y. */ __( 'For Google Analytics, please see Adding Analytics to your AMP pages; see also the Analytics wiki page and the AMP project\'s %4$s documentation. The analytics configuration supplied below must take the form of JSON objects, which begin with a %5$s and end with a %6$s. Do not include any HTML tags like %4$s or %7$s. A common entry would have the type %8$s (see available vendors) and a configuration that looks like the following (where %10$s is replaced with your own site\'s account number):', 'amp' ), __( 'https://developers.google.com/analytics/devguides/collection/amp-analytics/', 'amp' ), __( 'https://amp-wp.org/documentation/playbooks/analytics/', 'amp' ), __( 'https://www.ampproject.org/docs/reference/components/amp-analytics', 'amp' ), 'amp-analytics', '{', '}', '<script>', 'googleanalytics', __( 'https://www.ampproject.org/docs/analytics/analytics-vendors', 'amp' ), 'UA-XXXXX-Y' ) ); ?>

{
	"vars": {
		"account": "UA-XXXXX-Y"
	},
	"triggers": {
		"trackPageview": {
			"on": "visible",
			"request": "pageview"
		}
	}
}

render_styles(); $analytics_entries = AMP_Options_Manager::get_option( 'analytics', array() ); $this->render_title( ! empty( $analytics_entries ) ); // Render entries stored in the DB. foreach ( $analytics_entries as $entry_id => $entry ) { $this->render_entry( $entry_id, $entry['type'], $entry['config'] ); } // Empty form for adding more entries. $this->render_entry(); $this->render_scripts(); } }