Custom plugin comScore cordova setting up in Ionic

Hi everyone,

I am trying to add a custom plugin, the name of it is comScore is a payed plugin that someone required me to add to his ionic app.

The following instructions are for Cordova:
You will need to install the comScore Cordova plugin via a terminal.

  1. First, extract the provided archive and take note of the path to the extracted contents in your development environment.
  2. Via the terminal, assuming that the current working directory is the top folder of your Cordova project, run the following command using the path to the extracted archive contents:
    $ cordova plugin add path_to_extracted_plugin_archive/comScoreCordova/
    The comScore plugin needs networking access to be allowed through the device sandbox.
  3. Add these tags to the project config.xml file to white-list the URLs that the comScore plugin will use for transmitting data to comScore.
    <access origin="*://*" subdomains="true" />
    At this point the comScore plugin should be available in your project, which means you will be able to use the Application Tag API in the JavaScript code of your Cordova project.

I have managed to add the plugin and I have it in my plugin folder, the thing is that now I am not able to access it, I am trying to do it like this:

Here we have the plugin.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<plugin xmlns=""
    <description>comScore Cordova plugin</description>
    <license>Copyright (c) 2015 comScore, Inc.</license>

    <!-- Important to let measurement leave -->
    <dependency id="cordova-plugin-whitelist"/>

    <js-module src="www/comscore.cordova.js" name="ComScore">
        <clobbers target="ns_" />

    <js-module src="www/comscore.streaming.js" name="StreamSense">

    <!-- android -->
    <platform name="android">
        <config-file target="res/xml/config.xml" parent="/*">
            <feature name="ComScore" >
                <param name="android-package" value="com.comscore.cordova.ComScore"/>

        <config-file target="AndroidManifest.xml" parent="/manifest">
            <uses-permission android:name="android.permission.INTERNET" />
            <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>

        <source-file src="libs/android/" target-dir="libs" framework="true" />
    <!-- ios -->
    <platform name="ios">
        <config-file target="config.xml" parent="/*">
            <feature name="ComScore">
                <param name="ios-package" value="SCORComScore"/>

        <source-file src="src/ios/SCORComScore.m" />
        <header-file src="src/ios/SCORComScore.h" />
        <header-file src="src/ios/SCORHelper.h" />

        <source-file src="libs/ios/comscore-cordova.a" target-dir="libs" framework="true" />


    <!-- windows -->
    <platform name="windows">
        <framework src="libs/win81rt/anycpu/ComScore.cordova.winmd" custom="true" versions="8.1" target-dir="lib/win81rt/" />
        <framework src="libs/win10/anycpu/ComScore.cordova.winmd" custom="true" versions="10" target-dir="lib/win10" />

The error thrown is always: Uncaught TypeError: Cannot read property ‘ns_’ of undefined