CyanogenMod is primarily based on the Android Open Source Project with extra contributions from many people within the Android community.
WARNING:
Installing custom ROM requires a custom recovery to be installed on your device, which will VOID your warranty and delete all your data.
Please visit the Disclaimer page below to agree with the risks involved and proceed before flashing this ROM to your phone:
ROM Disclaimer link
Installing Cyanogenmod ROM to your device:
Custom recovery:
To install a custom ROM first of all you need to have a custom recovery installed on your device.Please visit the below link to install TWRP custom recovery and root your Moto G 4G:
Moto G 4G Recovery installation and rooting guide
Cyanogenmod ROM:
When you are done with the custom recovery installation process you need the Cyanogenmod custom ROM for your device.Below is the link that takes you to the official Cyanogenmod Peregrine ROM download page:
Peregrine (Moto G 4G) device build page on Cyanogenmod servers
Download the latest build according to the date added and keep the .zip file on your SD card.
Now follow the same rooting guide to flash Cyanogenmod as well:
Instead of copying the SuperSU mentioned in the next step, here you have to copy the Cyanoenmod .zip file which I believe that you have already done in the previous step.
Cyanogenmod flashing through TWRP recovery
The ROM flashing will take a little while.
When it will be done you can reboot your system and enjoy the Cyanogenmod on your device.
Stay tuned to get more updates