google-analytics-next
v1.0.0
Published
Google Analytics integration for Next.js applications
Downloads
2
Maintainers
Readme
��#� �g�o�o�g�l�e�-�a�n�a�l�y�t�i�c�s�-�n�e�x�t�
�
�
�
�#�#� �U�s�a�g�e�
�
�
�
�A�d�d� �t�h�e� �e�n�a�b�l�e� �c�a�l�l� �i�n� �y�o�u�r� �_�a�p�p�.�j�s�.�
�
�
�
�I�f� �y�o�u�r� �A�p�p� �i�s� �a� �c�l�a�s�s�:�
�
�
�
��
��j�s�
�
�i�m�p�o�r�t� �R�e�a�c�t� �f�r�o�m� �"�r�e�a�c�t�"�;�
�
�i�m�p�o�r�t� �{� �e�n�a�b�l�e�G�o�o�g�l�e�A�n�a�l�y�t�i�c�s� �}� �f�r�o�m� �'�@�/�c�o�m�p�o�n�e�n�t�s�/�g�o�o�g�l�e�-�a�n�a�l�y�t�i�c�s�/�g�o�o�g�l�e�-�a�n�a�l�y�t�i�c�s�'�;�
�
�
�
�
�
�c�l�a�s�s� �M�y�A�p�p� �e�x�t�e�n�d�s� �A�p�p� �{�
�
�
�
� � �c�o�m�p�o�n�e�n�t�D�i�d�M�o�u�n�t�(�)� �{�
�
� � � � �e�n�a�b�l�e�G�o�o�g�l�e�A�n�a�l�y�t�i�c�s�(�p�r�o�c�e�s�s�.�e�n�v�.�G�O�O�G�L�E�_�A�N�A�L�Y�T�I�C�S�_�I�D�)�;�
�
� � �}�
�
�
�
� � �
�
� � �r�e�n�d�e�r�(�)� �{�
�
� � � � �c�o�n�s�t� �{� �C�o�m�p�o�n�e�n�t�,� �p�a�g�e�P�r�o�p�s� �}� �=� �t�h�i�s�.�p�r�o�p�s�;�
�
� � � � �r�e�t�u�r�n� �<�C�o�m�p�o�n�e�n�t� �{�.�.�.�p�a�g�e�P�r�o�p�s�}� �/�>�;�
�
� � �}�
�
�}�
�
�
�
�e�x�p�o�r�t� �d�e�f�a�u�l�t� �M�y�A�p�p�;�
�
�
��
�
�
�
�
�I�f� �y�o�u� �A�p�p� �i�s� �a� �f�u�n�c�t�i�o�n�a�l� �c�o�m�p�o�n�e�n�t�:�
�
��
��j�s�
�
�i�m�p�o�r�t� �R�e�a�c�t�,� �{� �u�s�e�E�f�f�e�c�t� �}� �f�r�o�m� �"�r�e�a�c�t�"�;�
�
�i�m�p�o�r�t� �A�p�p� �f�r�o�m� �"�n�e�x�t�/�a�p�p�"�;�
�
�
�
�i�m�p�o�r�t� �{� �e�n�a�b�l�e�G�o�o�g�l�e�A�n�a�l�y�t�i�c�s� �}� �f�r�o�m� �'�@�/�c�o�m�p�o�n�e�n�t�s�/�g�o�o�g�l�e�-�a�n�a�l�y�t�i�c�s�/�g�o�o�g�l�e�-�a�n�a�l�y�t�i�c�s�'�;�
�
�
�
�f�u�n�c�t�i�o�n� �M�y�A�p�p�(�{� �C�o�m�p�o�n�e�n�t�,� �p�a�g�e�P�r�o�p�s� �}�)� �{�
�
� � �u�s�e�E�f�f�e�c�t�(�(�)� �=�>� �{�
�
� � � � �e�n�a�b�l�e�G�o�o�g�l�e�A�n�a�l�y�t�i�c�s�(�p�r�o�c�e�s�s�.�e�n�v�.�G�O�O�G�L�E�_�A�N�A�L�Y�T�I�C�S�_�I�D�)�;�
�
� � �}�,� �[�]�)�;�
�
� � �
�
� � �r�e�t�u�r�n� �<�C�o�m�p�o�n�e�n�t� �{�.�.�.�p�a�g�e�P�r�o�p�s�}� �/�>�;�
�
�}�
�
�
�
�e�x�p�o�r�t� �d�e�f�a�u�l�t� �M�y�A�p�p�;�
�
�
��
�
�
�
�
�I�t� �w�i�l�l� �t�r�a�c�k� �r�o�u�t�e�s� �c�h�a�n�g�e�s� �b�y� �d�e�f�a�u�l�t�.�