Mailing List Archive

Help with Extension?
On our wiki (1.34 and is public), I'm trying to load an external library of
JavaScript and then record a pageview for web analytics. So I wrote a
simple extension.
Extension Not working

The extension I created AdobeLaunch
<https://github.com/freephile/AdobeLaunch/commits/main>

- changes content on the page (See ‘Adobe Launcher was here’ on any page
<https://beta.familysearch.org/wiki/en/Philipsburg,_Centre,_Pennsylvania>
),
- and shows as installed on Special:Version
<https://beta.familysearch.org/wiki/en/Special:Version>

But, the javascript code
<https://github.com/freephile/AdobeLaunch/tree/main/resources/ext.adobeLaunch>
is
not loaded at all.
Pure JavaScript Not working

I tried a pure JavaScript implementation (e.g. MediaWiki:Common.js) too
without success.

/* Adobe Launch added 2020-11-09 */
(function(a,b,c,d){
a='//assets.adobedtm.com/05064fe6cab0/c247cd0acad1/launch-7e623b6eec86.min.js';
b=document;c='script';d=b.createElement(c);d.src=a;d.type='text/java'+c;
a=b.getElementsByTagName(c)[0];a.parentNode.insertBefore(d,a);
})();

$( document ).ready(function() {
console.log( "ready! Recording Page View\n" );
window._satellite.track('page_view',{
'site_id': 'FamilySearch',
'site_language': mw.config.get('wgContentLanguage'), // 'en'
'page_channel': 'Wiki',
'page_detail': document.location.pathname //'Home' for the
homepage or a unique page title for other pages
});
});


Gadget Definition Not working

I also tried a Gadgets implementation but it wouldn’t work. (Activate it
here <https://beta.familysearch.org/wiki/en/MediaWiki:Gadgets-definition>)
FamilySearch Wiki
<https://beta.familysearch.org/wiki/en/MediaWiki:Gadget-AdobeLaunch.js>
Gadget-AdobeLaunch.js
<https://beta.familysearch.org/wiki/en/MediaWiki:Gadget-AdobeLaunch.js>

function init() { /* Code that depends on document-ready, external script,
and some modules. */ console.log( "ready! Recording Page View\n" );
window._satellite.track('page_view',{

Help?


~ Greg


eQuality Technology

*Let's work together*

https://equality-tech.com
follow us: https://twitter.com/eQualityTech
*creators of https://QualityBox.us <https://QualityBox.us> *