/**
 * Internal dependencies
 */
import { wpApiFetch } from './wp-api-fetch';

const defaultSettings = {
	accountID: 100,
	propertyID: 200,
	profileID: 300,
	internalWebPropertyID: 400,
	useSnippet: true,
	// ampClientIDOptIn: (bool)
};

/**
 * Activate and set up the Analytics module.
 * @param {Object} settingsOverrides Optional settings to override the defaults.
 */
export async function setupAnalytics( settingsOverrides = {} ) {
	const settings = {
		...defaultSettings,
		...settingsOverrides,
	};
	// Activate the module.
	await wpApiFetch( {
		method: 'post',
		path: 'google-site-kit/v1/modules/analytics',
		data: { active: true },
	} );
	// Set dummy connection data.
	await wpApiFetch( {
		method: 'post',
		path: 'google-site-kit/v1/modules/analytics/data/settings',
		data: {
			data: settings,
		},
		parse: false,
	} );
}

/**
 * Internal dependencies
 */
import { wpApiFetch } from './wp-api-fetch';

const defaultSettings = {
	accountID: 100,
	propertyID: 200,
	profileID: 300,
	internalWebPropertyID: 400,
	useSnippet: true,
};

/**
 * Activate and set up the Analytics module.
 * @param {Object} settingsOverrides Optional settings to override the defaults.
 */
export async function setupAnalytics( settingsOverrides = {} ) {
	const settings = {
		...defaultSettings,
		...settingsOverrides,
	};
	// Activate the module.
	await wpApiFetch( {
		method: 'post',
		path: 'google-site-kit/v1/modules/analytics',
		data: { active: true },
	} );
	// Set dummy connection data.
	await wpApiFetch( {
		method: 'post',
		path: 'google-site-kit/v1/modules/analytics/data/settings',
		data: {
			data: settings,
		},
		parse: false,
	} );
}

Remove reference to ampClientIDOptIn in setupAnalytics utility.
Remove reference to ampClientIDOptIn in setupAnalytics utility.
