ePrivacy and GPDR Cookie Consent by Cookie Consent Skip to main content

How to verify that Meiro Events SDK has been correctly implemented

Developers who integrate Meiro Events should be responsible for checking that all the implemented events are sent as intended. 

Learn more: To learn how to implement Meiro Events SDK on the website, please go to this article.

1. Check if Meiro Events has been successfully initialized on the website

Open the website where Meiro Events has been installed on. on and o

Openpen the browser's developer tools, go to the console and type: console.log(MeiroEvents).

Success: Usually, you can find developers tools on Firefox go to Menu > Web Developer > Inspector > Console; on Chrome go to Menu > More Tools > Developer Tool > Console

The response would be the object with a function, for example, {init:f, track:f} means that Meiro Events works properly on the website you are visiting. 

If you do not see the object with functions as a response, for example, {init:f, track:f}please check if you followed all the steps on setting up SDK.

The possible reason may be a typo in the SDK set on the website. The console in developer tools may as well indicate the error type you are facing. 

Warning: If a problem persistspersists, please contact the Meiro team to assist you.

reponse.png

2. How to check if page view events are sent properly

Open the website where Meiro Events has been installed on. on and o

Openpen the browser's developer tools and go to the Network tab. 

Usually, you can find developers tools on Firefox go to Menu > Web Developer > Inspector > Console; on Chrome go to Menu > More Tools > Developer Tool > Console

Look for Request Payload displayed in the network tab with POST requests to SDK endpoint, page view event payload and response status 200 OK. 

Request payload is typically an array of objects (events), each of them contains fingerprint, session_id, timestamp, type, user_id, version, payload  (external_id if defined) as in the screenshot below.

Warning: If you initialized Meiro Events with external_id, it’s necessary to check that all types of events containcontaining external_id in the request.

Learn more: To learn more about payloads, please visit this page

payload.png

error-200.png3)

3. How to check contact forms submits

Check the payload

After the implementation of contact form submit, submit the form to check if works as intended.

Open the browser's developer tools, go to the Network tab and find the contactFormSubmit request.

Usually, you can find developers tools on Firefox go to Menu > Web Developer > Inspector > Console; on Chrome go to Menu > More Tools > Developer Tool > Console

Check if the payload is sent as intended. 

To learn more about payloads, please visit this page. To learn about contact form submits, please go to this article

If you initialized Meiro Events with external_id, it’s necessary to check that all types of events contain external_id in the request.

If you can’t find the event of the form you submitted, something is likely wrong with the implementation. 

Check if the MeiroEvents.track the method is called.

For example, insert console.log("track called") above method call and then check within the console if a method is seen.  

If yes, you can use the catch block to see the error message (example on the screenshot below). 

If the MeiroEvents.track method is not called, there may be some other problems with implementation connected to the website setting (like not catching submit events, error with data processing/transformation etc.). In that case, try to identify problems within your website code. 

ContactWarning: Remember to have one form on the Meiropage teaminstalled ifat a time, otherwise you needwill collect events twice.

Warning: If you initialized Meiro Events with external_id, it’s necessary to check ifthat all types of events containing external_id in the SDK process has been followed as intended.  request.

console.png

Check form cancellations

If the form submission is followed by immediate page transition (and your website is not the single page app/form is not sent asynchronously via javascript), then you may see cancelled event submissions. 

This should not occur for forms sent asynchronously (ajax, single-page applications, …). If you’re not sure, you can check it through slowing your internet connection via console -> network tab, send form few times and see if a cancelled event occurs.

slow-internet.png

Warning: Remember you should not set two different tracking methods on the same page as an event likely will be tracked twice. Choose the one that is the most suitable for your use case.

Learn more: To learn more about how to fix the event cancellation, please go to this article.

4. How to check custom events 

Open the website where Meiro Events has been installed on.on and o

Openpen the browser's developer tools and go to the Network tab. 

Usually, you can find developers tools on Firefox go to Menu > Web Developer > Inspector > Console; on Chrome go to Menu > More Tools > Developer Tool > Console

 Perform the action for custom events you wish to track. 

Check in the developers' tools, network tab if the event was properly recorded and sent to Meiro Events. 

Warning: Remember you should not set two different tracking methods on the same page as an event likely will be tracked twice. Choose the one that is the most suitable for your use case.

Warning: If you initialized Meiro Events with external_id, it’s necessary to check that all types of events containcontaining external_id in the request.

Learn more: To learn more about payloads, please visit this page To learn about customer events, please go to this article

5. Check finalized

After this check, Meiro Events SDK should be working as expected with events sent to Meiro Events. 

 

Success: In case of any troubles, please contact the Meiro team.