how to use Google-analytics-4 in Vue.js 2 - vuejs2

Is vue-gtag can be only used in vue3?
then, how can use GA4 in vue2, any references there, or demo code?
Thanks!

You can use vue-gtag version 1 which supports vue2.
And also, gtag is not vue spec, it's on javascript spec

Related

What does it mean by 'Requires js' when using TailwindCSS?

I am completely new to Vue and Tailwind. I was just looking at https://tailwindui.com/components/marketing/elements/headers and saw the Requires JS tag. When I copy-paste the code to my project, it gives a blank page. Where do I configure this part to include the JS?
Nvm, I just had to read the documentation. https://tailwindui.com/documentation#using-vue

How to use existing cumulocity widget in custom widget

I created a custom widget using angular 10, Now I wanted to add a datapoint list in the configuration(edit) and access it
I am using c8y-data-point-list directive but my angular application not able to find this selector/associated component.
so my first question is how to use the existing angularJs component in angular? how to import it?
is it possible?
I also want to use more widget in a custom widget from ng1-module, how to achieve it?
c8y-data-point-list is not in the official list of cumulocity components, so it's not possible to use it.
Also the highest version of angular would be the 8th, as they currently only support it and still use angularJS components.

How can I get the component code before compile in Vue2.x?

What problem does this feature solve?
<code-box title="基本" describe="button基本用法">
<i-button>Default</i-button>
</code-box>
I want to get default Slot String like <i-button>Default</i-button> in codeBox.
I can find then api _slotContents in vue 1.x.
Is there any way can get the same function in vue 2.x?
What does the proposed API look like?
_slotContents in vue 1.x
If I understand correctly, you want to use scoped slots.
If for some reason you really want to get the rendered html inside your component you can use this.$el.innerHtml.

How to build documentation for vuejs component?

Is there a tool to build documentation for vuejs components in a way similar to what Quasar or Vuetify do for their own components? ie: a browseable table with tabs corresponding to prop, slot, methods, events?
Is there anythis similar to what is Sphinx for Python, ie a tool that does introspection of the code to collect info to show?
Searching in google returned a lot of docuemntation ON veujes rather than how to document our vuejs code...
From my limited research, I've found this one: https://vuese.org. I haven't tried it though.

How to customize/ extend ootb components in spartacus

I am new to Spartacus and I am trying to add more elements to the component AddedToCartDialogComponent. Not sure how I can customise/extend this component.
I need to extend the typescript and also the template which is the view for this component.
Probably, your best bet is reading through the Spartacus docs about customizing components here. Also try to find your answer in other places in our docs.
If your question was about extending components from Angular perspective, you should probably first read Angular docs