Magento Google tag manager manually - magento

I have a website which is running on Magento. There i'd like to add a code inside the body tag of each page. Where can i find this on my website? Is this a single file or do i have to do this on every page.
Anything would be helpful.

You can add it in Magento backend:
Log into Magento backend;
Navigate to System→Configuration, under ‘General’ open ‘Design’,
scroll down and click to extend the Html Head section;
Paste the GTM Code into the field next to Miscellaneous Scripts;

Related

adding slider in magento to cms page

{{block type="bannerslider/default" name="bannerslider.bannerslider" template="bannerslider/bannerslider.phtml" bannerslider_id="your_bannerslider_id"}}
I am trying to add a slider using the above code, to a cms page in Magento.
My banner id is called mySlider, so have done:
{{block type="bannerslider/default" name="bannerslider.bannerslider" template="bannerslider/bannerslider.phtml" bannerslider_id="mySlider"}}
Nothing shows.
I saw that someone recommended setting each banner to the day before it was creating but that didn't work either.
You should copy module files to your current template files. So that you have bannerslider/bannerslider.phtml in your templates folder.
Also look if slider is active and with slider content.
You should use the banner ID which is the number in the first column in the admin panel (under the section for managing the slider). What you are using now is simply the title.

Building Magento - how to keep code and CMS in sync

We are developing with Magento 1.7.0.2, we are having problem of keeping our code and our CMS page in sync. Let say I have a branch that task include
Create a new CMS page
Use jQuery slider to display products on this new CMS page
We create a new CMS page in Magento admin. We then add jquery.js and js for slider, and write js function to slide all products inside the main div of the new CMS page. However, when we check code into our branch, we only able to checkin the js files. So people are assigned to review this task, they only able to pull the js code, but not the CMS page, which I think locate inside the database. Therefore, they are unable to test, since I dont have the CMS page. I am thinking of couples way:
Passing the db around. This is not a solution, because it is big, and will take long time to import.
point db connection in app/etc/local.xml to the remote db that contain the CMS page. Also not a valid solution, because magento store url in database under web/unsecure/base_url. So I will always get redirect to the other machine ip address instead of my local ip address.
So how do I resolve this issue? What are industry accepted method for this?Please help? THank you very much
Did you try to place full content outside of block code and use only its template?
Let's say you have static page 'Slider-2014'. In WYSIWYG editor you place
{{widget type="cms/widget_block" template="customjs/slider-2014.phtml"}}
In app/design/frontend/base/default/template/ create folder 'customjs'
In folder customjs create file slider-2014.phtml and place anything you need to show in slideshow:
<div class="slider"></div>
Clear cache if needed. Then reload /slider-2014.html page and you'll get all content from that file. Now you can share folder customjs

Magento: Update several pages with a different tracking code

I have to put some Tracking code on several pages: some category pages, homepage, cart and success page. Whats the best way to accomplish that?
I thought:
homepage --> place the code in CMS -> pages -> home
success --> edit the success.phtml
cart --> edit the cart.phtml
categories -> create a CMS block --> place layout update in the concerning category page to load CMS block
But it looks like it is just a mess because for every code I have another solution. What would you suggest to get it done? Did I miss a better solution?
Thank you,
Hannes
If it's the same tracking code for each one, you could
Create a .phtml file containing the code
Add the file to the relevant hard pages (success, cart) using your layout xml files
Add the file to the relevant soft pages (home, categories) using the custom design tab / custom layout update area.
If the code changes based on the page, then you may need to create a new module with a block that alters the tracking code according to a parameter you include in the layout.
You can include a tracking script using the available Magento configurations fields.
Go to System > Configuration > Design
Under the HTML Head section, insert your tracking script into the Miscellaneous Scripts field.
Save Config, and clear your Magento caches.
Alternatively if you want it in the Footer instead, look under the Footer section and use the Miscellaneous HTML box there.

Compilation renders my home page content blank

I want to enable Compilation on our Magento website, but when I enable it, I get blank content for my home page. It stops rendering before outputting the menu. Category and product pages seem to be fine.
We use the Mercado theme, and the home page uses a HomepageGrid block which is a CMS page.
Could anybody provide some insight?
Thanks
all you have to do is to check your error log. blank page means php error, and your output configured into error log, not screen. possible places to look: path_to/magento/var/log/ files system.log and exception.log. or /var/log/ and folders httpd/error_log etc. looks like you have some module like featured products or other custom stuff on front page, check your CMS > Pages > Homepage content. thank you

How to edit magento home page via code?

Hello I'm trying to edit home page
http://www.kreatifyazilim.com/magento/
For example I want to write code on the middle part of the page, ( banner )
The dropdown boxes you can see on demo must be included in banner side.
Go to Magento admin->CMS->Pages
Select Home Page
In Content Tab, add your dropdown
Create a new template (home.phtml).
(make a copy of design/frontend/base/default/template/page/1column.phtml).
And choose this template in the CMS Page design layout.
You can freely edit the complete template (PHP+HTML)

Resources