magentogoogle-website-optimizer

Apply Google Website Optimizer code to Multiple Products in Magento


Within Magento we are doing quite a bit of Google Website Optimizer (GWO) testing across multiple areas. We are about to start a MetaVariate test on our product pages but want to apply it to a sub-set of all our products. Ideally I would like to configure this in Magento Admin but we are talking roughly 900 products out of 2000 that would get the code.

Since GWO in Magento is not considered an Attribute for a product, the mass updating of products to receive this GWO code via "Update Attributes" at the product level is not an option. Is there any way I can apply multiple GWO codes to these products in the Magento Admin or am I looking at a manual update? When we did a similar test under Categories we had to do a manual insert but that makes sense because there is no mass updater for categories. The otehr option I am thinking of is inserting the code into an area like "Description" which is not ideal because it won't immediately load the change before rendering.

Thoughts? Ideas? Opinions?


Solution

  • I was a bit under the gun on this so I came up with the following solution. Google Optimizer code is put into the Magento Database in the table googleoptimizer_code. I just doctored up an SQL statement to update the table for multiple products based on product ID. I can then insert or remove the GWO tags as needed.