#NextJs starter Store Front File System

7 messages · Page 1 of 1 (latest)

wet coral
#

hello, how is it possible to change StoreFront file structure to be able to implement Head and google analytics in a client side file?
(remove layout.tsx, add _app.tsx, _document.tsx)?

grand hearth
#

I have minimal experience with Next, but I think you want to inject your own custom components into those files, not remove them.

I also pointed you here not to be snarky but because this channel with its threads format is much better for help questions.

wet coral
#

i appreciate your help

#

about Nextjs: there is Layout component and it renders on Server and the plugin i use for Google Analytics renders on client

#

so i either have to find a way to render it on server

#

or change the file structure to pages/_document,_app

#

never mind, just use " 'use client' " in the element you want to render on client side