In the past I was able to create a layer and specify interactivity and which fields would be returned on featuerOver etc. The code below worked in the past but now returns and error of "Interactivity is read-only in NamedMaps"
cartodb.createLayer(map, 'link to my viz')
.addTo(map)
.on('done', function(layer) {
layer.setInteraction(true);
layer.getSubLayer(0).setInteractivity("cartodb_id,_name")
layer
.on('featureOver', function(e, latlng, pos, data) {
console.log(data);
})
}).on('error', function(err) {
console.log("some error occurred: " + err);
});