I don't like that this method has 2 functions, but the name does not reflect that. It should only convert the URI, according to its name, but it's also setting the statsSender resources. Would rather change the name of the method or separate the 2 things. BTW, look at the other comment, here you setResources to the page URI, then you setResources to assets. Seems wrong to me. It should add the assets (keeping the page URI as a resource as well) otherwise it won't be able to update the stats for the page URI.