For one of our requirements, we need to attach goals to few types of media items.
Going though each item in media library and adding 'gaols' through 'Analyze' tab will be tedious as there are hundreds of items. Is there any way to do it through script or code?
For getting the goals\events attached, we can check in "_Tracking" field. But Im not getting the exact syntax to update this field.
Any hints?
You can also achieve this without coding or PowerShell, using the search functionality within Sitecore. First go to the Media Library, then find the specific folder you're interested in.
With the folder selected you can then click on the little magnifying glass icon (next to the tabs Folder and Content). That will open a new tab where you can build a search query. After building that and getting your results back, you can click the little down arrow next to the search query, and click the 'Search Operations'. Select the 'Apply campaigns events', which will open an 'Attributes' pop-up.
Go to the second tab called 'Events', and select your goals.