diff --git a/index.js b/index.js index 07a4d05a..655b8e27 100644 --- a/index.js +++ b/index.js @@ -5,8 +5,12 @@ module.exports = { name: 'ember-cli-fbq', contentFor: function(type, config) { - if (type === 'head-footer' && config.fbq && config.fbq.enabled && config.fbq.id) { - return '' + if (type === 'head-footer' && config.fbq && config.fbq.enabled && config.fbq.ids) { + let initIds = ''; + config.fbq.ids.forEach(id => { + initIds += 'fbq("init", "' + id + '");' + }); + return '' } } }; diff --git a/package.json b/package.json index 98cfcdcf..11a57c3a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ember-cli-fbq", - "version": "2.0.0", + "version": "3.0.0", "description": "An Ember CLI Addon to add support for Facebook Pixel", "keywords": [ "ember-addon",