Microbial communities in guts flexibly adjust to changes in host dietary intakes, but the relationship between diet and gut microbiome is still poorly studied in wild animals. DNA metabarcoding approaches are frequently used to characterise diets or gut microbiomes of diverse species. However, to date, no study has combined these approaches to investigate diet-gut microbiome associations in wild mammals with diverse and fluctuating dietary intakes, such as omnivores. Here, we do this for two African mammals, Civettictis civetta and Genetta spp., from the family Viverridae. We characterised bacterial communities and identified taxonomic groups within diet by sequencing vertebrate, invertebrate and plant markers on faecal samples. This led us to establish diet compositions that diverged from what has previously been found using visual identification methods for these species. Specifically, while the two genera have been categorised into the same dietary guild, we detected more animal-based diets in C. Civetta, and higher proportions of plants consumed by Genetta spp. Diet similarity correlated with gut microbiome similarity in Genetta spp., indicating that plant consumption may be an important driver of gut microbiome structure. The novel insights we provide into the omnivorous diet of C. civetta and Genetta spp. highlight the importance of detailed identification of the dietary guild of species, not only for ecology and conservation, but also when researching how diet shapes the gut microbiome.