However, no values appears in my hit. Then I tried to put this code in my configuration tag or/and in my event tag and the dimensions appears in my hit but they are empty.
there are maybe several problems that prevent the data from showing up in reports: First of all, your _paq.push([“trackEvent”…) call misses an eventValue. Add a 0 of no value is present and try:
If it still fails: did you make sure (in preview for example) that the {{dimensionX}} variables and others like {{Category}} and {{Action}} really contain values? You could try constant values instead of variables, too. Instead of implementing the changes, you can send the pushes in your browser´s console for faster feedback.
The Tracker Debugger should then help when you send broken events (they will show up there, along with an error message that indicates what is missing).
If they arrive there, you can inspect the raw data (hover over the “Custom Event” to get a link to the raw request). You should find your parameters and dimensions there if everything is okay:
EDIT: Your second attempt to set the dimension values before sending an event fails because of a missing “]” at the end. If you fix that and then send the event without dimension parameters, the result will match the first option to send them along with the event.