You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my Vue application, I installed a plugin to modify the event properties of the default [Amplitude] Page Viewed event.
Here is the code for the plugin:
I expected that when I used the track(), it would send an analytics event for me. I also expected the default event [Amplitude] Page Viewed would also have a new event property
Current Behavior
Right now the default event [Amplitude] Page Viewed would have the new property. This is what I expected. However, when I use the track(), it did not send any events or print out any errors. The first console.log would print out the information of the tracking event. But neither the console.error in the catch block or the console.log in the then block would print out any information of the tracking event. It also does not give me any network calls in my Network tab of my Chrome browser dev tool
Possible Solution
Steps to Reproduce
Create a sample vue 2 app
Get key for amplitude and install this plugin for Vue app
Use this.$analytics.track('Sample track events', { hello_world: 'Hello world' })
See if events are being sent in the Chrome network tab
Environment
JS SDK Version:
Installation Method:
Browser and Version:
The text was updated successfully, but these errors were encountered:
The track() would work normally. I think there can be a potential bug in the createInstace() where it does not provide context of current amplitude instance to track(). This particularly results that the instance created by createInstance() would not be accessible to amplitude.track(). Maybe in the docs, there should be somewhere saying that if we use createInstance() to create an instance, we need to use that instance throughout the code, such as instance.track() instead of amplitude.track()
quankhuc1
changed the title
Track() is not firing any network calls
Track() is not firing any network calls when initializing with createInstance()
Jan 16, 2024
Expected Behavior
In my Vue application, I installed a plugin to modify the event properties of the default
[Amplitude] Page Viewed
event.Here is the code for the plugin:
This is how I installed the plugin:
I expected that when I used the track(), it would send an analytics event for me. I also expected the default event
[Amplitude] Page Viewed
would also have a new event propertyCurrent Behavior
Right now the default event
[Amplitude] Page Viewed
would have the new property. This is what I expected. However, when I use the track(), it did not send any events or print out any errors. The firstconsole.log
would print out the information of the tracking event. But neither theconsole.error
in the catch block or theconsole.log
in the then block would print out any information of the tracking event. It also does not give me any network calls in my Network tab of my Chrome browser dev toolPossible Solution
Steps to Reproduce
Environment
The text was updated successfully, but these errors were encountered: