Integrating Fixel with MGID

Fixel events can be used in MGID to ensure consistent targeting and messaging across various platforms.

Integrating Fixel with MGID using DOM Events

To trigger the Fixel events in Segment, simply add this snippet to your site:

    document.addEventListener('fxl_event', function(event) {
            var base_mgid = '[[account]]&type=c&tg=&r=[[hostname]]/Fixel-[[grade]]&utmc=0&utmt=0&nv=1&utms=&utmcp=&utmm=&cmgid=0&cmtid=0&cmtuid=0';
            var mgid_id = '123456';
            var mgid_link = base_mgid.replace('[[account]]',mgid_id).replace('[[hostname]]', document.location.protocol + '//' + document.location.hostname).replace('[[grade]]', event.class);
            var img_mgid = document.createElement('img');
            img_mgid.src = mgid_link;

Make sure you replace the mgid_id variable (highlighted in red) with your MGID account ID

Was this article helpful to you? Yes No

How can we help?